cakephp分页
如何在一个控制器中使用多个分页? 我有以下代码:cakephp分页,cakephp,Cakephp,如何在一个控制器中使用多个分页? 我有以下代码: var $paginate = array( 'post' => array( 'limit' => 2, 'order' => array( 'post.id' => 'asc', ), ), ); **And in the same controller need this p
var $paginate = array(
'post' => array(
'limit' => 2,
'order' => array(
'post.id' => 'asc',
),
),
);
**And in the same controller need this paginate:**
var $paginate = array(
'post' => array(
'conditions' => array('Post.name IS NULL or Post.id>50'),
'limit' => 20,
'order' => array(
'post.id' => 'asc',
),
),
);
如何在一个控制器中使用两种不同的分页
function otherAction() {
$this->paginate = array('post' => array('conditions' => ...)));
$posts = $this->paginate();
}
或
请详细描述“不同分页”的含义。否则就帮不上忙了。
$posts = $this->paginate('Post', array('conditions' => array()));