Welcome Guest, Not a member yet? Register   Sign In
Last Insert ID accuracy
#1

[eluser]nuwanda[/eluser]
The MYSQL manual says:

Quote:The value of mysql_insert_id() is affected only by statements issued within the current client connection. It is not affected by statements issued by other clients.

So... it is *impossible* that the insert_id (from an auto increment field) can be incorrect?

The manual implies that it is relative to the calling client.

Are there any circumstances where CI could return an inaccurate insert ID during the execution of the current script, assuming no other inserts or updates have occurred prior to the call for the last insert ID?
#2

[eluser]WanWizard[/eluser]
What the manual means is that inserts by other connections don't alter the insert_id() of your connection.

See The MySQL manual for more info.




Theme © iAndrew 2016 - Forum software by © MyBB