RE: [PHP-DB] mysql_insert_id() vs. last_insert_id()

From: Date: Tue, 28 Jan 2003 17:42:51 +0000
Subject: RE: [PHP-DB] mysql_insert_id() vs. last_insert_id()
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25210@lists.php.net to get a copy of this message
> So I read this thread and the MySQL doc on mysql_insert_id() and still > have > a related question. > > Does mysql_insert_id() function on a per-connection basis? I read the > stuff > on last_insert_id() and it specifically mentions that the last ID is > stored > on the server on a per-connection basis. However, the info on > mysql_insert_id() makes no such specific claim. > > The reason I ask is, if you use mysql_insert_id() on a busy server and it > does not function on a per-connection basis, don't you run the risk of > getting the last ID of somebody else's INSERT query on the server? Yes, they are both on a per-connection basis. They'd be useless otherwise. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.db (#25210) next »