Page Method

The page method is part of database class builder for limiting query result.

Basic Usage

Here is the basic usage page method from $db property on SENE_Model class.

$this->db->page(int $page, int $pagesize): $this->db


This method has 2 required parameters.


The $page value is for determine the current page of specified pagesize.


The $pagesize the maximum result row count per page.


On this example will show limiting the result query by using page method in model class.

class Blog_Model extends SENE_Model{
  var $tbl = 'blog';
  var $tbl_as = 'b';
  public function __construct(){
  public function showFirstPagePer5Rows(){
    return $this->db->get();

Page method v.s. Limit Method

Page method used for limiting by page and page size.

Limit method used for limiting data by MySQL traditional limit method.