Re: Re: deprecated mysql funcs

From: Date: Mon, 05 Jan 2004 15:06:23 +0000
Subject: Re: Re: deprecated mysql funcs
References: 1 2 3  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969357954@lists.php.net to get a copy of this message
Gabor Hojtsy wrote: > Read the docs of the function, it is not the same. The function is > supposed to return the ID *you have inserted* in this session, while the > SELECT return the ID last *inserted by someone*, maybe paralelly to your > session. MySQL LAST_INSERT_ID() documentation says: "The last ID that was generated is maintained in the server on a per-connection basis. This means the value the function returns to a given client is the most recent AUTO_INCREMENT value generated by that client. The value cannot be affected by other clients, even if they generate AUTO_INCREMENT values of their own." Thus it should be the same. Anyway, I am against making this function obsolete. Jakub Vrana

« previous php.doc (#969357954) next »