On 1/28/03 8:26 AM, "Christopher Lyon" <[EMAIL PROTECTED]> 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? The easiest way is probably to add an ORDER BY field DESC into your SQL statement. If you use an autoincrement field you could use that otherwise add a field and make it TIMESTAMP. Hth/h --------------------------------------------------------------------- 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