Reputation: 2706
i am using CakePHP version 2.x I want to show CakePHP pagination using ajax.
here is my code
$start_point=$data['point'];
$to_id = $this->User->find("all",array('limit'=>array($start_point,5),'recursive' => -1));
pr($to_id); exit;
I have 100 or more records in user table but the above code is shows only first records. I need 5 records per row and starting from $start_point
>> There is not pagination buttom simple scroll down the next record will show like facebook.
Upvotes: 0
Views: 43
Reputation: 1299
//$page=$data['point'];
$page=1;
//page should be 1 or 2 or 3 and so on.
$lenght = 10;
$to_id = $this->User->find("all",array('limit'=>$lenght, 'page'=>$page,'recursive' => -1));
pr($to_id); exit;
Upvotes: 0