Re: last entry in mysql

From: Date: Wed, 12 Dec 2001 19:14:14 +0000
Subject: Re: last entry in mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77470@lists.php.net to get a copy of this message
You should try using mysql_insert_id() with the connection descriptor. For example: $dblink = mysql_connect($host, $user, $password); mysql_select_db($databasename, $dblink); .... The $dblink variable or what I call the connection descriptor, should be used with mysql_insert_id($dblink); --Jon At 10:30 AM 12/12/2001 -0600, Yoed Anis wrote:
hey guys, quick question I'm having trouble finding an answer too. In a mysql database, how can I select that last row entry. This might be done mins after i put that entry there and i tried to use: $lastid=mysql_insert_id(); to get the last id but to no avail. Thanks Yoed -- 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 (#77470) next »