Changing Model Conditions in another controller
Hi,
I have a Member model with hasMany Subscriptions.
Now, in another controller, I am calling the Member Model to give me
some data.
I want now to create a find() which lists me all active members with
their active subscriptions.
Getting the active Members is easy, as this information is stored
within the members table.
But how can I get now only the active subscriptions for this
particular member?
When I call $members = $this->Member->find('all');
Cake performs 2 statements.
1. to get all member results
2. to get all subscription results
To get only active members I can set conditions within the find ()
method.
But how can I access the 2. query conditions which is selecting the
subscription results?
Please advise, thanks in advance!
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home