mysql_insert_id() vs. last_insert_id()

From: Date: Tue, 28 Jan 2003 14:43:45 +0000
Subject: mysql_insert_id() vs. last_insert_id()
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25203@lists.php.net to get a copy of this message
Hi I've been checking the last_insert_id() function out and I am curious. The MySQL docs say to use the mysql_insert_id() function after an "insert into" query to grab the key value. Both seem to work; however, there are some subtle differences. Which is the best one to use after a single insert statement, or does it matter? ---------------------------------------------------------------------- Randy Phillips www.phillips-it.com phillipsIT, L.L.C. voice: 636.390.9468 Senior Web Developer eFax: 501.423.3817 ---------------------------------------------------------------------- Get SideKick -> for MySQL -> http://www.phillips-it.com/sidekick

« previous php.db (#25203) next »