MySQL has LAST_INSERT_ID();
function which gets the last insert.
But this is not safe: If i run some query then get LAST_INSERT_ID()
and between the two another query is executed I can get the wrong id.
This can happen in multiple threads using the same connection, or using pconnect (persistend connection for multiple users)
Is there safe method for getting the ID that i want 100% ?
Thanks