Use the limit clause.
SELECT message_text FROM messages ORDER BY creation_date LIMIT $limit,
$offset.
LIMIT 10, 0 gets you the first batch.
LIMIT 10, 10 gets you the second batch.
LIMIT 10, 20 gets you the third, etc.
-----------------------------------------
Water overcomes the stone;
Without substance it requires no opening;
This is the benefit of taking no action.
Lao-Tse
Brian Knox
Senior Systems Engineer
brian@govshops.com
On Sun, 30 Jul 2000 database@gurubase.com wrote:
> Dear all,
>
> Is there a way I can select the top 50 rows from table, 51 - 100 rows from
> table etc.... (with order clause)? It is because I am writing a message board
> and I would like to create the prev/next button on different page.
>
> Many thanks.
>
> Best regards,
> Boris
>