Page 1 of 1

php mysql loop links

Posted: Thu Nov 09, 2006 3:31 pm
by amir
I want to show 5 images across the bottom of a page.
If you click on the next arrow, the page will refresh and show the next 5 images,
once it goes off the end, it will loop

I have a table:
ID, image, sortOrder, name

page
img1 img2 img3 img3 img4 img5
<>

click next

img2 img3 img4 img5 img1
<>

how do I do that?

I know the sql

Code: Select all

select * from item order by sortOrder
how do sort and loop the results?

Posted: Thu Nov 09, 2006 3:40 pm
by feyd
This is a pagination style issue. The query would use the LIMIT clause.