I'm not 100% sure what your question is.  This may help you:

http://book.cakephp.org/view/75/Saving-Your-Data#counterCache-Cache-your-count-816

counterCache is a nice way to track count of related data.  Then you can
just do a find where album_count > 0

On Mon, Nov 30, 2009 at 12:26 AM, Gaurang <[email protected]> wrote:

> Hi
>
> I am relatively new to cake-php but i like it very much. But in my
> current project i have a problem regarding having query
>
> I have a Model called User and other model called Album.
>
> Now i want to display a list of users having at least one Album. My
> user model has others relations also like
>
> User has many Photos
> User has many Comments
> User has many Links
>
> I tried to google it and also tried to think by my self but could not
> find a solution.
>
> I can achive this using Model->query but i think it is not a good way
> to code cakephp.
>
> Can anyone help me this issue?
>
> Thanks
>
> Gaurnag
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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