How to give a sorting using paginate.. and how to set a limit also…
my code is :-
in controller :-
$this->paginate('ProductZone');
in view ctp:-
<th><?php echo $this->Paginator->sort('TDU','ProductZone.zone_id'); ?> </th>
<th><?php echo $this->Paginator->sort('Energy Charge','ProductZone.energy_charge'); ?></th>
<th>500 KwH(¢/kWh)</th>
<th>1000 KwH(¢/kWh)</th>
<th>2000 KwH(¢/kWh)</th>
<th>Plan Desc</th>
You use the paginate property to set the paginate method settings.