/**
  * This returns the next chunk of database result objects.
  *
  * @return array|null Set of Omeka_Record instances, or null if none can be
  * found.
  * @author Eric Rochester <*****@*****.**>
  **/
 public function next()
 {
     $this->pageNumber++;
     $this->select->limitPage($this->pageNumber, $this->rowCount);
     $rows = $this->table->fetchObjects($this->select, $this->params);
     return $rows;
 }
示例#2
0
文件: Db.php 项目: natxetee/magento2
 /**
  * Render sql select limit
  *
  * @return  Varien_Data_Collection_Db
  */
 protected function _renderLimit()
 {
     if ($this->_pageSize) {
         $this->_select->limitPage($this->getCurPage(), $this->_pageSize);
     }
     return $this;
 }
示例#3
0
 /**
  * Apply pagination to a select object via the LIMIT and OFFSET clauses.
  * 
  * @param Zend_Db_Select $select
  * @param integer $limit Number of results per "page".
  * @param integer|null $page Page to retrieve, first if omitted.
  * @return Zend_Db_Select
  */
 public function applyPagination($select, $limit, $page = null)
 {
     if ($page) {
         $select->limitPage($page, $limit);
     } else {
         $select->limit($limit);
     }
     return $select;
 }
示例#4
0
文件: Model.php 项目: rocknoon/TCVM
 /**
  * @return WeFlex_Db_Model
  */
 public function limitPage($page, $rowCount)
 {
     $this->_selector->limitPage($page, $rowCount);
     return $this;
 }