Page 1 of 1

paginated query results

Posted: Wed Sep 13, 2006 5:21 pm
by andym01480
I have a basic cart that outputs a table based on one of 3 user queries - keyword search, main category or sub category. Those are inputted to the cart through the URL from links and would be cleaned $_REQUEST variables.

Currently that could yield 144 results, which looks amateurish!

If I want to paginate the results so there aren't two many.

My thoughts

Option 1) $_REQUEST variables containing the original query and pagination variables...
Do the query
Work out how many rows
Work out how many pages
Check what page no from

Code: Select all

$_REQUEST['pageno']
, default to 1
Create Page no links
Output current page of results

Option 2) use Session variables to do the same

Option 3) ????

What is the best way to do it?

Posted: Wed Sep 13, 2006 5:28 pm
by feyd
You may be interested in the paginator arborint and timvw, among others, helped bang out in .. Theory I think it was.