RE: RE: [PHP] mysql_insert_id

From: Date: Thu, 29 Jun 2000 01:56:12 +0000
Subject: RE: RE: [PHP] mysql_insert_id
Groups: php.general 
Request: Send a blank email to php-general+get-3714@lists.php.net to get a copy of this message
If I leave parameters blank so $lastID = mysql_insert_id(); $lastID is 0 (zero) And also if I use: $link = mysql_connect("$DBHost","$DBUser","$DBPass"); $lastID = mysql_insert_id($link); $lastID is 0. ...Thanks for your help.. > > Can anybody tell me the proper sintax in order to get the last id? > > > > mysql_insert_id(); > > > > The optional parameter is for the connection, not the query (it defaults > to the last MySQL > > connection you used). This would be useful if you had a couple different > MySQL connections open. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > >

« previous php.general (#3714) next »