In message <[EMAIL PROTECTED]>, Mahmood Hamidi
<[EMAIL PROTECTED]> writes
>Hi, 
>I have a single table in my MySQL database where I have put my items info.
>What I want to know is how to get and list, say my 10 latest additions
>only. I have figured it out to get all the table items ordered in
>descending order and can list them from the latest and down to the
>oldest

So you have already found a SELECT statement, which must be something
like
SELECT this, that FROM itemtable ORDER BY orderfield DESC


> but I need just the latest 10 or 5 (the 10 or 5 at the top of
>the list) or if the in one single day I have added 12 items I want all
>those 12 items but if the addition of the latest date has been 7,
>those 7 + 3 before them. 

You just need to add LIMIT 10, to give you something like
SELECT this, that FROM itemtable ORDER BY orderfield DESC LIMIT 10

-- 
Pete Clark

Sunny Andalucia
http://hotcosta.com/Andalucia.Spain

Reply via email to