Hi list,
I'll just preface the issue I'm having with what I'm trying to do...I'm
trying to extend Cake's AppModel to make it easier to return results
suited for producing a DataGrid with pagination controls. The goal is
to setup Models to be worked with in the controller like:
$this->Model->dataGrid('true');
$data = $this->Model->findAll(......);
$this->set('data', $data);
The data that is returned back will look like this:
Array (
'num_pages' => 6
'rows' => Array(
....
)
This leads to my problem which occurs in AppModel::beforeFind. To
calculate num_pages, you have to know how many records are in your
un-bounded dataset. So I try to do a $this->findCount() and the page
goes blank. No error on the screen or in a log anywhere.
Does anyone know how to return a row count from within a Model without
pulling all the data?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---