I need Auto generated sequence number staring from 001 ONLY FOR 3 DIGITS in PHP / MYSQL
ex: 001 next will be 002 and next will be 003 ... 009 .. 010 ..119..120..etc but number generated should be in sequence wise not like 001 then 120 or 008 etc , i need in sequence number.
actually i have product tracking system . where i need mixer of my main product id + auto sequence number ( only 3 digit can change if wanted ) hence my final product id becomes :
111-001 , 111-002 , 111-003 , 111-004 ....etc
Note: this auto sequence number will be insert in my mysql database ( after ADD button follows by Update query ( hence my auto sequence will be enter in database with Update query ))
This should work for you with slight modifications to fit ur requirement
Try this code:
Output :00020
Just add the length 3 and zerofill to your id column.