> I know I'm trying to re-invent the wheel, but it is because I don't
> how
> they do it.  I set up a script to pull a ruleset from mysql and then
> through each row in the set.  I then check each row as it loops until
> get
> to the row number I want and start echoing rows.  I create the row
> by a $m=0; outside the loop; $m++; inside the loop.  Then I stop
> rows when it reaches 50 iterations.  The total iterations achieved is
> passed
> on to the next script that does the same thing but starting where the
> total
> left off.  This causes a lot of overhead as all of the resultset are
> pulled
> for each script.  Does anyone have a magic bullet for this?  This
> functionality is what I take search engines to be demonstrating.  If
> anyone
> can help, I could wipe the sweat of my processors brow!  (and mine for
> that
> matter)

SELECT * FROM tbl WHERE ... LIMIT $start, $per_page;

Adjust $start and $per_page accordingly to get your "paging"...

---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to