PHP Classes


Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in

      Ultimate MySQL  >  All threads  >  Pagination  >  (Un) Subscribe thread alerts  
Summary:Does this class have built in pagination?
Author:Bill Van Pelt
Date:2011-09-20 15:46:27
Update:2013-02-27 19:55:03

  1. Pagination   Reply   Report abuse  
Picture of Bill Van Pelt Bill Van Pelt - 2011-09-20 15:46:27
I see the selectRows method has a limit but I'm not able to see where you can implement pagination.

  2. Re: Pagination   Reply   Report abuse  
Picture of marcelo santana marcelo santana - 2013-02-27 19:55:03 - In reply to message 1 from Bill Van Pelt
i use a pagination.class with this class ...

made no modifications on Ultimate Mysql class
and on index.php i do this:

$pages = new Paginator;
$pages->items_total = $db->RowCount();
$pages->mid_range = 7;
$db->SelectRows("mytable",null,null,'created', false, $pages->limit);

and on pagination.class line 100
$this->limit = ($_GET['ipp'] == 'All') ? "":" LIMIT $this->low,$this->items_per_page";

remove the "LIMIT"

$this->limit = ($_GET['ipp'] == 'All') ? "":" $this->low,$this->items_per_page";

and works like a charm