Jump to content

Generate Member Number based on next row number in DB


adzie

Recommended Posts

Because of the possibility of concurrent access, you CANNOT use mysql_insert_id()+1 for any purpose other than to display the number. As soon as you attempt to actually use that number, you will eventually create a mess with multiple records having the same number in it.

 

You need to use an auto-increment field to insure uniqueness.

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.