my auto_increment field is set to integer(6) zerofill.
and when i call the last inserted id via mysql_insert_id(), it gives me e.g. 5 whereas in db its 000005.
any ideas to tackle this???
thank you,
Daarius...
my auto_increment field is set to integer(6) zerofill.
and when i call the last inserted id via mysql_insert_id(), it gives me e.g. 5 whereas in db its 000005.
any ideas to tackle this???
thank you,
Daarius...
$pad_number = str_pad($number, 6, "0", STR_PAD_LEFT);
Brendan
Website Design Victoria BC
As to the "why", it's because mysql_insert_id() returns an integer, not a string.