Reputation: 1166
how to convert this statment to pagination with condition rules
$comment = $this->Article->Comment->find('all',
array('conditions' =>
array('Comment.article_id' => $id, 'Comment.status' => 1)));
i do this but i get parce error
var $paginate = array(
'limit' => 5,
'page' => 1,
'order' => array('Comment.created'=>'desc'),
'conditions' => array('Comment.article_id' => $id, 'Comment.status' => 1)
);
$this->Article->Comment->recursive = 1;
this->set('comment', $this->paginate());
Upvotes: 2
Views: 3630