But that seems useless, just a workaround for the problem. There are
count(*) functions in databases for just this purpose, so as not to violate
Third Normal Form rule of creating databases. There should be an easy way to
use the count(*) function from Cake.

Eric



On 2/13/07, Sergei <[EMAIL PROTECTED]> wrote:
>
>
> If you have this problem, this means you didnt make field in the posts
> table something like "commentcount". Then you should increment it,
> when adding comments (and decrement when deleting).
>
> Then you just write condition like:
>
> Post.commentcount = 0
>
> On 13 фев, 10:13, "Alex" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > How is it possible to fetch only Posts, which havent got any Comments
> > (comments belongs to post)?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to