Need help in Auto Increment to add a default number. How can i add a number before the number to be auto incremented in php using mysql database... for example i want my ID to be 0001 after adding a row in the table, the ID would be 0002, and so on and so forth... but I can't it only shows... 1, 2, 3, then 4 and so on.. is it possible to make my integers start with 3 zeroes or 2 zeroes, and if it will arrive to 10, only two zeroes will appear before the number instead of three? for example, 0001, 0002... 0010, 0011, 0012... how can i do it in mysqL? need help anyone, i hope u got my point T___T i'm a very newbie in this stuff T_T
is there a reason for this? i mean starting at 1 really hurts nothing. for display purposes simply echo sprintf("%04d",$row['id']); PHP: