Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
- New php-forum User
- Posts: 15
- Joined: Wed Mar 27, 2013 7:59 am
Better to split that varchar field into two separate fields, one of varchar to keep the character part and the other should be integer or numeric on which you can enable auto increment.
e.g. field_1 will be 'C' and field_2 will be 1,or 2, or 3 etc. When you display you can concatenate both as C1 or C2 etc
The other option will be to increment the field on the application side and just save it to the varchar field in the database.e.g. if the original value was C001 in the table, increment it to C002 and save it so that the new field value will be C002.
- php-forum Super User
- Posts: 1805
- Joined: Thu Mar 10, 2011 5:07 pm
Return to PHP coding => General
Who is online
Users browsing this forum: Bing [Bot], Yahoo [Bot] and 2 guests