Hi all,
I have used a custom query with group by in pagination.
I got the the grouped output, but the record count is different (i.e.
I am getting the record-count as the total number of records without
grouping).
The format I have used for pagination is:
$this->paginate['Model'] =
array(
'conditions' => 'some condition',
'fields'=>array('user_id','type_id','country_id','COUNT(*)','SUM
(duration)','SUM(rate)'),
'group'=>array('User.office_id','country_id'),
'limit' => $this->paginate['limit']
);
One more thing is that, I am using the same Model for many pages.
Please give me a suggestion to fix this...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---