Page 1 of 1

Posted: Wed Dec 17, 2003 2:03 am
by Sarvesh Kumar
i had select images by category through mysql database.if a category has 10 images and i want to display only 5 on a page, and other 5 are in other but the other 5 will display when i click next on the first page.How i can do it by a php script?

Posted: Wed Dec 17, 2003 3:35 am
by aquila125
SELECT * FROM images WHERE ... ORDER BY ... LIMIT ".($page*5).",5

this should do the trick... $page must be between 0 and (number_of_images_in_db * 5)