> select posts.id, comments.id, count(comments.id) as commentscount from
> posts, comments where comments.posts_id = posts.id where commentscount =  
> 0
> group by posts.id;
>

select p.* from posts p left join comments c on c.post_id=p.id where c.id  
is null;


> Right?

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