Re: Getting the primary key from a MySQL insert

From: Date: Sat, 17 Jul 2004 11:34:57 +0000
Subject: Re: Getting the primary key from a MySQL insert
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190839@lists.php.net to get a copy of this message
Hi ! You can user mysql_insert_id() for this purpose. zareef ahmed --- Andrew Wood <ajwood@iee.org> wrote: > If the primary key in a MySQL DB is an > autoincrementing integer, is > there anyway of automatically getting it back when I > do an insert in > PHP. In other words taking the status returned by > mysql_query and > extracting the PK of the record we just entered? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ===== Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com __________________________________ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/

« previous php.general (#190839) next »