getting a auto-increment id back out of the database

From: Date: Fri, 09 May 2003 16:25:51 +0000
Subject: getting a auto-increment id back out of the database
Groups: php.general 
Request: Send a blank email to php-general+get-147038@lists.php.net to get a copy of this message
I have a query where I insert a bunch of stuff into a table, and it creats a new record with a new id, auto-incremented by MySQL. Right after I insert this, I want to instert some other stuff into another table using the new id that was just created. Is there a way to get that id out without doing a select that matches everything I just inserted (especially since there could be multiple records with that same data?)

« previous php.general (#147038) next »