Re: limit items per page
| From: | James Holloway | Date: | Mon, 23 Jul 2001 09:04:10 +0000 |
| Subject: | Re: limit items per page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59155@lists.php.net to get a copy of this message | ||
Hi Steph,
as the name suggests, use LIMIT ;)
Ie,
SELECT * FROM TABLE LIMIT 0,25
The 0 (or other number) is optional, and tells the table which row to start
limiting from, the secon number is the number of rows to limit to.. So:
SELECT * FROM TABLE LIMIT 25,25
Would bring out 25 rows, starting from row 25 (rows 25 to 50). See the
documentation at the mysql site for more info.
Cheers,
James.
"Steph" <steph@goamerica.net> wrote in message
news:001701c11354$db6b2fa0$ab8d7a3f@vaio...
Ive got an image gallery, and rather than having one really long page of
thumbnails, I'd like to have around 25 thumbnails (5 rows of 5 thumbs) per
page. Can you guys point me in the right direction??
Steph