I am going to use the Zend_Paginator class in my project. I found class examples on the Internet. One of them -
$sql = 'SELECT * FROM table_name '; $result = $db->fetchAll($sql); $page=$this->_getParam('page',1); $paginator = Zend_Paginator::factory($result); $paginator->setItemCountPerPage(10)); $paginator->setCurrentPageNumber($page); $this->view->paginator=$paginator;
in the first row, it actually selects all the rows from table_name. What if i have a table with 50,000 rows? That would be very inefficient.
Is there any other way to use Zend Paginator?
php zend-framework zend-paginator
Moon
source share