04-09-2009, 01:46 AM
|
#7 (permalink)
|
|
The Contributor
Join Date: Mar 2009
Location: Springfield, IL USA
Posts: 75
Thanks: 3
|
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.
Note that:
Code:
$newp = $_GET['p'];
must be in the top of the page before any other codes.
Also:
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. 
|
|
|
|