RE: [PHP-DB] last record of mysql table

From: Date: Tue, 09 Oct 2001 20:48:47 +0000
Subject: RE: [PHP-DB] last record of mysql table
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13163@lists.php.net to get a copy of this message
SELECT * FROM table ORDER BY id DESC LIMIT 1; -----Original Message----- From: Ivan Balazs [mailto:ibalazs@sch.bme.hu] Sent: Tuesday, October 09, 2001 4:19 PM To: php-db@lists.php.net Subject: [PHP-DB] last record of mysql table Hi all! Problem: I'd like to get the last inserted record of a table in a mysql database. In other words: to obtain the last row of the table. Specifically the thing is this: I'm making an adveritsement site, and I'd like to get the latest ad submitted. Question: how to do that? Thanx Balazs -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#13163) next »