RE: [PHP] most recent 5 rows

From: Date: Sat, 04 Aug 2001 11:05:37 +0000
Subject: RE: [PHP] most recent 5 rows
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61233@lists.php.net to get a copy of this message
It will give you the 5 HIGHEST values in your auto incremented field. If it was returneding the first 5, or the wrong 5, repace the DESC with ASC. Jeff > -----Original Message----- > From: Justin French [mailto:justin@indent.com.au] > Sent: Saturday, August 04, 2001 6:09 AM > To: jeff@hyrum.net > Cc: php > Subject: Re: [PHP] most recent 5 rows > > > Jeff Lewis wrote: > > > Try this SQL Justin: > > > > $sql = "SELECT * FROM news DESC LIMIT 5"; > > > Hrm, > > Won't that retrieve the FIRST 5 rows, not the LAST 5? > > > Justin French > >

« previous php.general (#61233) next »