On 9/27/06, Jon Bennett <[EMAIL PROTECTED]> wrote:
> if you have setup an association between Posts and Comments, this info
> should already be there, try pr ($this->Post->findAll); in your
> controller to see what's there, because you should be able to jsut
> count() the comments, eg:

It seems a bad idea to me to do it like this from a performance point
of view. A findAll() fetches all rows from the database, while a
count(*) in the database returns only one row with the count.

Any recommendations from someone with more knowledge of the CakePHP core?

-- 
  Martin Schapendonk, [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to