I use PDO prepared statements to insert records. And uses lastInsertId to get id of inserted record. But is this good?
Because what happens when several users insert at same time? lastInsertId will conflict in that situation? So I should use transaction?
please help
Every PHP script basically lives on its own. When several users insert at the same time, user A will get his last insert’s row idA and user B will get her last insert’s row idB.