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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to