php - mysqli_insert_id: What if someone inserts another row just before I call this? -


my question rather simple one. i've read recommended method of retrieving auto_increment/id value of row i've inserted in mysqli mysqli_insert_id() function. however, i'm not familiar , had question: (this theoretical @ point)

for these purposes (hence mysqli bit) going php web application. multiple users on application @ once , row inserted different page between time insert row , time call mysqli_insert_id()?

would return incorrect value, or mysql have sort of feature prevent such thing? or overestimating possibility of such scenario?

thanks time.

mysqli_insert_id() specific database connection -- returns id of row this script invocation inserted recently, not other mysql client. there's no conflict if multiple applications inserting database @ same time.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -