My code
$this->paginate=array(
'conditions' =>array('OrderDetail.order_id'=>$id),
'maxLimit' => 500));
$this->paginate=array(
'conditions' =>array('OrderDetail.order_id'=>$id),
'limit' => 500));
Both result giving me 100 records max thou i set limit as 500,as if i set 500 i need 500 records.! can any body help me on this ?
CakePHP eases the burden on the developer by providing a quick, easy way to paginate data. Pagination in CakePHP is offered by a component in the controller. You then use View\Helper\PaginatorHelper in your view templates to generate pagination controls.
Pagination is the process of separating print or digital content into discrete pages. For print documents and some online content, pagination also refers to the automated process of adding consecutive numbers to identify the sequential order of pages.
If you think about it: You need to combine them.
public $paginate = array(
// other keys here.
'maxLimit' => 500,
'limit' => 500
);
You need to first raise the maxLimit to the absolute limit you want to allow. Then you can set the limit to any value up to this point. Only setting one of them does not change anything (logically).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With