Are you sure?
I thought mysql_num_rows() would give you the ID number of the last row in a
table IF AND ONLY IF there hasn't been any row deletions.  I expect to have
deletions, but I'll try it out anyway.  Thanks,
Hugh
----- Original Message -----
From: Jason Murray <[EMAIL PROTECTED]>
To: 'hugh danaher' <[EMAIL PROTECTED]>; Php-General
<[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 9:40 PM
Subject: RE: [PHP] Getting the last record in a mysql table


> > I thought this would be easy but it ain't.  What I want is
> > the id number of the last record in a table.
>
> If you use mysql_num_rows() and decrement it by one, you'll
> have the ID of the row you can use with mysql_result.
>
> Jason


-- 
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