简体   繁体   中英

how to add condition to pagination in cakephp 1.3

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());

按照此处的分步说明进行操作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM