Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
03-19-2009, 05:29 PM #1
- Join Date
- Nov 2008
- The Great Pacific NW, USA
- Thanked 6 Times in 6 Posts
Slow Pagination (potentially) - Is there a better way?
I still count myself as a newbie, so my approach (and code) are on the simple side.
Now, I'm a big fan of "Why think zebra when donkey will do", so simple suits me, but not at the expense of performance.
Right now, I am running my query (using my custom qry func), generating my pagination vars from those results, then re-running the query using the pagination vars.
Is there a better way of doing this (like maybe not running the qry twice)?
Here's a snippet of my code:
$rows = mysql_num_rows($dataset);
$limit=($pagenum - 1)*pageRows.",".pageRows;
Last edited by mOrloff; 03-19-2009 at 05:49 PM.