whatever the primary key # of the last insert query
performed.
This help at all?
From: Niklas Lampén [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Subject: RE: [PHP] Getting the last record in a mysql table FINALLY!!
Date: Fri, 18 Jan 2002 10:05:35 +0200
Well
Niklas,
I needed to change the statement slightly, but it did put me on the right
track.
Thanks again,
Hugh
$result=mysql_query(SELECT id FROM my_table ORDER BY id DESC, id limit 1);
$id=mysql_result($result,0);
- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General
Well, ofcourse you have to have the table + field names right. ;)
Niklas
-Original Message-
From: hugh danaher [mailto:[EMAIL PROTECTED]]
Sent: 18. tammikuuta 2002 9:38
To: [EMAIL PROTECTED]
Cc: Php-General
Subject: Re: [PHP] Getting the last record in a mysql table FINALLY
3 matches
Mail list logo