On Wednesday 28 June 2006 01:39 pm, Dirk Bremer wrote: > Dan, > > That might be close. The rows are inserted with an auto-increment > primary key, but I have no ready way of knowing what the latest 50-IDs > are. There are also various date columns, but I won't readily know the > dates in this scenario.
That's why ORDER BY id DESC is used, it basically flips your table reverse, so that last inserted (in essence the highest ID) is first, all the way down to the first inserted (the lowest ID). Then LIMIT 50 will give you 50 from highest id to lowest ID, or the last 50. -- Chris White PHP Programmer/DBlonde Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]