May be it could work
SELECT  * FROM item ORDER BY ID LIMIT count(*)-10,10
or
SELECT  * FROM SELECT  * FROM item ORDER BY ID DESC LIMIT 10 ORDER BY ID




----- Original Message -----
From: Karlsson Andreas-andkar01 <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 6:00 PM
Subject: How to select the 10 last items from a table?


Hi,
I have a table were all rows have their own ID. How can I select only the
last items out of this table?
This command fixes it but I receive the items in the wrong order that I
would like them...
SELECT * FROM item ORDER BY ID DESC LIMIT 10
brgds
Andreas

Andreas Karlsson
MAGNET- Motorola Applications Global Network
Campus Gräsvik 2
371 75 Karlskrona
Phone: +46-455-379 306
E-mail:[EMAIL PROTECTED]
____________________________________________
Become a MAGNET member - register at:
http://www.motorola.com/developers/wireless/

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





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