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...

    6 years later

    As to the "why", it's because mysql_insert_id() returns an integer, not a string.

      Write a Reply...