Login   Register  
PHP Classes
elePHPant
Icontem

Pagination

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

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

  1. Pagination   Reply  
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  
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
http://net.tutsplus.com/tutorials/php/how-to-paginate-data-w ...

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

$db->SelectTable("mytable");
$pages = new Paginator;
$pages->items_total = $db->RowCount();
$pages->mid_range = 7;
$pages->paginate();
$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