In a high traffic application, is it possible for mysqli_insert_id()
to return the wrong id, or to confuse the id between two INSERT
queries performed nearly simultaneously?
No. mysqli_insert_id
returns the most the AUTO_INCREMENT
value from the most recent INSERT
query on the current connection. It will never get confused with another connection, for example.