View Full Version : pagination
Jolten
09-01-2004, 06:22 PM
I've got a page set to display $max_results per page then flip through pages. It works great. I'm having trouble developing a link on the page that turns off the paging. Can anyone help?
Thanks
I'm having a bit of trouble understanding what you want to do. Could you please explain?
Jolten
09-01-2004, 07:32 PM
Hi rake,
I've got a form in a php page. And the php is set to build page numbers based on rows of the database.
So... 10 rows per page then the script builds page 2.
Then it places links for previous, next, and the page number at the bottom of the page.
Just a basic php pagination.
What I wnat to do is add a link on this page that allows a user to see all results on a single page if they want, essentially turning off the pagination. I'm not sure how to write a link to ignore the $max_results/page limitation.
Thanks
you could just add another variable..
if($all = true)
{
$startat = 0;
$max_results = 999999;
// where sql query is something like SELECT * FROM table LIMIT $startat,$max_results
}
then you just unset the variables for previous/next page, et cetera.
Jolten
09-01-2004, 08:14 PM
Thnaks rake. I hadn't considered a second variable.
I appreciate the assistance. Will try.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.