Jump to content

mysql_insert_id()


jkkenzie

Recommended Posts

The command below works BUT when i delete ALL data from my database say from my autoincrement primary key field "id" 1to 20,  the next inserted field "id" value would be 21, BUT the command below gets 0 instead of 21.

 

I need this code to pick the "id" value used to store the record.

                                                                                       

$mysqlval= mysql_insert_id();

 

Thanks

Joseph

Link to comment
https://forums.phpfreaks.com/topic/135308-mysql_insert_id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.