How to Limit the paginate in cakephp
How to Limit the paginate in cakephp ? Assume that i have 400 records. I need to get only 25 records from 50th record to 75th record and need to display 5 records per page. How i can do this in paginate ? Sample Code: $this->paginate = array( 'contain'=>array('User'), 'recursive' => 2, 'order' => array('Profile.winning' => 'DESC'), 'limit' =>5 ); You can set conditions for the pagination. function listRecords() { $this->paginate = array( 'conditions' => array('Model.id >=' => 50, 'Model.id <=' => 75), 'limit' => 5 ); $this->paginate('Model'); ); EDIT: A solution from here : $this->paginate =