Rich wrote:
Ah that makes sense. It's a double shot, first grabbing the necessary records, then selecting all in that temp value (hitlist) in reverse order.

Well done.

Cheers

On Jun 30, 2007, at 11:26 AM, Octavian Rasnita wrote:

Hi,

Try something like this:

select * from (select * from table_name where ... order by last_update desc limit 10) as tbl order by tbl.last_update;



Rich in Toronto



I guess you could do:

select * from table WHERE id >  ((SELECT MAX(id) from table) - 10);

Its not perfect, but it executes pretty fast for me.

--
Andrew Hutchings - LinuxJedi - http://www.linuxjedi.co.uk/
Windows is the path to the darkside...Windows leads to Blue Screen. Blue Screen leads to downtime. Downtime leads to suffering...I sense much Windows in you...

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to