Forum Moderators: coopster

Message Too Old, No Replies

I have 100 articles ordered by date

How i put on a page just results from 10 to 15?

         

rowtc2

1:54 pm on Jan 6, 2009 (gmt 0)

10+ Year Member



I have 100 articles and every article have a date yyyy-mm-dd (when was added in database)

1]. On a page i have ordered in descendent mode by date a number of 10 articles.


$sql = "select * from articles ORDER BY date DESC LIMIT 10";

2].I need ,on other page, to order by the same date another 5 articles.These 5 articles should not be the same from the page 1]. they should be the next from 10 to 15 .

In other words, if i have 15 articles ordered by date,how can i put on a page just a list with articles from 10 to 15 ? (and skip from 1 to 10)?

eelixduppy

3:29 pm on Jan 6, 2009 (gmt 0)




$sql = "select * from articles ORDER BY date DESC LIMIT 10, 5";

rowtc2

5:50 pm on Jan 7, 2009 (gmt 0)

10+ Year Member



Yes, thank you :)