On Tue, 2003-01-28 at 12:26, Christopher Lyon wrote:
> I am trying to do an sql query and am trying to select the last x rows
> from the database. I see the limit function but that seems like that is
> from the first row down. I want to start from the last row to the first
> row. So, selecting the last 5 rows for instance? Can this be done?
SELECT * FROM blah-blah ORDER BY whatever DESC LIMIT 0,5

-- 
    __                               
   / \\   @       __     __    @   Adolfo Bello <[EMAIL PROTECTED]>
  /  //  // /\   / \\   // \  //   Bello Ingenieria S.A, ICQ: 65910258
 /  \\  // / \\ /  //  //  / //    cel: +58 416 609-6213
/___// // / <_/ \__\\ //__/ //     fax: +58 212 952-6797
    www.bisapi.com   //            pager: www.tun-tun.com (# 609-6213)


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to