How to paginate after doing 2 queries?
I have:
$this->Paginator->settings = array(
'conditions' => array('Record.status =' => 'published',
'RecordUser.flagged =' => null,
'Record.category_id =' => $likes
),
'limit' => 5,
'order' => array('rate' => 'desc')
);
and I want to do this as well:
$this->Paginator->settings = array(
'conditions' => array('Record.status =' => 'published',
'RecordUser.flagged =' => null,
'Record.category_id !=' => $likes
),
'limit' => 5,
'order' => array('rate' => 'desc')
);
then merge the results.. The problem is the result on 1st query limits to 5 then continues to the 2nd page. I want all results from the 1st query before the result on the 2nd query displays.
How do I do this? I'm using cakephp 2.4.3