Hi all,
I am doing some self-learning about pagination in cakePHP 1.26.
In the PostsController, I have this code:
$this->set('views', $this->Testing->Reply->findAllBypost_id($id));
I am trying to alter the code for pagination purpose,
and this is what I have tried out:
$this->paginate=array('conditions'=>array('Reply.post_id'=>'0'), 'limit' => 4);
$w = $this->paginate($this->Testing->Reply);
$this->set('views', $w);
I am not sure if this is the best way to do it, please comment.