I'm working on a cakephp project and new to cakephp. As mentioned in the title I need to paginate the result set of a mysql query in order to display them in a view.
In this way I can paginate results from the "Asin" model.
$this->paginate =array('Asin'=>array(
'fields' => array('sku','fnsku'),
'conditions' => $marketplace,
'page' => 1, 'limit' => 20,
'order' => array('Asin.asin' => 'asc')
)
$data = $this->paginate('Asin',$criteria);
And I need a way to paginate the result set of the below query as well.
$resultset = $this->Asin->query("SELECT * FROM products INNER JOIN asins ON products.id=asins.id ORDER BY products.id");
how can I add pagination?