RE: [PHP-DB] last record

From: Date: Tue, 25 Jan 2005 03:33:59 +0000
Subject: RE: [PHP-DB] last record
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-38310@lists.php.net to get a copy of this message
hi using mysql as you describe is probably the most elegant and efficient way to do it is there a reason for asking php to do it? Peter > -----Original Message----- > From: neil [mailto:neil@jansons.net] > Sent: 25 January 2005 03:12 > To: php-db@lists.php.net > Subject: [PHP-DB] last record > > > Apart from the obvious of reversing the sort order in a select > statement and > then picking off the first record > > eg. select * from blah where somefield like '%something%' order by > someotherfield desc limit 0,1 > > is there any way in php rather than sql to pick the last record > in a record > set? > > Thanks > > Neil > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#38310) next »