In answer to your second question, I assume that if you're getting the
results in your controller like:
$this->set('varname',$this->Model->findAll(options));
just add another:
$this->set('varnamecount',count($this->varname));
alternatively, use this:
$this->set('varnamecount',$this->Model->findCount(options));
The problem with the second method is that it would perform the
database query twice, whereas the first method uses the PHP count()
function, which counts the elements in an array
Thie $varname and $varnamecount variables would then be available in
your view and controller, whichever method you choose
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---