Page 1 of 1

Previous and Next Buttons

Posted: Tue Oct 04, 2005 3:13 pm
by icesolid
I was wondering how to create previous and next buttons for data in a mysql database. Limiting results to 10 per page.

Posted: Tue Oct 04, 2005 4:43 pm
by Ambush Commander

Code: Select all

?limit=10&offset=10
Would be page two then, right? You use "offset" to scroll through data, use hyperlinks to link to the current offset + 10 and - 10.

If you need more explanation, ask.

Help

Posted: Tue Oct 04, 2005 4:54 pm
by icesolid
Could you explain that better or possibly show me some sample code?

Posted: Tue Oct 04, 2005 4:55 pm
by John Cartwright
Look in the Code Snipplets forum for MYSQL pagination class, assuming you are using a mysql db ;)