Php & MySql Pagination Script
View Single Post
04-09-2009, 01:46 AM
Join Date: Mar 2009
Location: Springfield, IL USA
Yes, the first query gets the total number of entries. The second query finds all data related to the first query.
The second query is where you'd do your SORT and so forth.
I've used this same pagination method for 10 years now and never had any problems with it.
$newp = $_GET['p'];
must be in the
top of the page
any other codes.
$plimit = "10";
can be changed to however many items you wish to show per page (e.g., 10, 20, 50, and so forth).
If you hit any problems, just ask.
View Public Profile
Send a private message to WebSavvy
Find More Posts by WebSavvy