Closed vindominguez closed 6 years ago
There a good logic for this case, check out this article: https://stackoverflow.com/questions/10680943/pdo-get-the-last-id-inserted
This gets the last id that has been inserted by the current PDO connnection, so even when you are inserting 1000 things in the same second, it will always get you the correct id!
Thanks!
How can I retrieve the auto increment id after insert?