View Single Post
Old 04-09-2009, 01:48 AM   #8 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by WebSavvy View Post
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:
Code:
$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.
ahhh it's like you read my mind, I was going to ask about

$plimit = "10";

But you brought it up already!

Back to the grind!! Will let you know how it goes...hopefully soon!
allworknoplay is offline  
Reply With Quote