On Wed, Jan 31, 2001 at 02:02:05AM +0300, Rus wrote:
> He need 10 last records ordered by id.
> 
> You also can try this
> SELECT  *,count(*) as c FROM item GROUP BY ID LIMIT c-10,10

mysql> select *,count(*) as c from lid group by id limit c-10,10;
ERROR 1064: You have an error in your SQL syntax near 'c-10,10' at line 1

> or
> SELECT  *,count(*)-10 as c FROM item GROUP BY ID LIMIT c,10

mysql> select *,count(*)-10 as c from lid group by id limit c,10;
ERROR 1064: You have an error in your SQL syntax near 'c,10' at line 1

Nope....

Still no one-query-solution....

-Remco

-- 
----------------------------------------------------------------------------
    Remco van den Berg                           Admin/SO/helpdesk DSE      
      ICQ: 47514668         [EMAIL PROTECTED]         http://www.dse.nl/       
----------------------------------------------------------------------------

---------------------------------------------------------------------
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