php - 1.0.0-rc1 zend framework how to use pagination -
can tell me how use pagination in zend framework 1.0.0-rc1.
i used not working in version.
$db = zend_db_table_abstract::getdefaultadapter(); $select = new zend_db_select($db); $statement = $select->from('product'); $statement = $statement . "order id desc"; $results = $db->query($statement); $rows = $results->fetchall(); $result = $db->fetchall($sql); $page=$this->_getparam('page',1); $paginator = zend_paginator::factory($rows); $paginator->setitemcountperpage(10); $paginator->setcurrentpagenumber($page); $this->view->paginator=$paginator;
please me regarding
Comments
Post a Comment