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 に制限され、2 ページ目に続くことです。2 番目のクエリの結果が表示される前に、1 番目のクエリのすべての結果が必要です。
どうすればいいですか?私はcakephp 2.4.3を使用しています