Re: Last 10 rows

From: Date: Wed, 18 Apr 2001 04:17:08 +0000
Subject: Re: Last 10 rows
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-49119@lists.php.net to get a copy of this message
Well - what is considered the last of the list? Is it a number? are they names? Either way you have a field you are ordering by ... SELECT * FROM table ORDER BY lastname DESC LIMIT 10; that'll do the trick. FYI you can sort numbers, dates, and chars - this is from the hip and you might be able to do others ... --Joe On Mon, Apr 16, 2001 at 11:53:12PM -0700, Randy Johnson wrote: > How do I get the last 10 rows in a table? > > thanks > > randy > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /* Joe Stump * Sr. PHP Developer * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net */

« previous php.general (#49119) next »