【发布时间】:2014-03-01 18:26:34
【问题描述】:
2次查询后如何分页?
我有:
$this->Paginator->settings = array(
'conditions' => array('Record.status =' => 'published',
'RecordUser.flagged =' => null,
'Record.category_id =' => $likes
),
'limit' => 5,
'order' => array('rate' => 'desc')
);
我也想这样做:
$this->Paginator->settings = array(
'conditions' => array('Record.status =' => 'published',
'RecordUser.flagged =' => null,
'Record.category_id !=' => $likes
),
'limit' => 5,
'order' => array('rate' => 'desc')
);
然后合并结果.. 问题是第一次查询的结果限制为 5,然后继续到第二页。我希望第一个查询的所有结果都显示在第二个查询的结果之前。
我该怎么做? 我正在使用 cakephp 2.4.3
【问题讨论】:
标签: php cakephp pagination paginator