http://api.cakephp.org/class_model.html#63ade7d3c6d03c83ab53a224e23ad9dd
On Jan 11, 10:43 am, "keymaster" <[EMAIL PROTECTED]> wrote:
> In $this->modelA->findAll(), can I include fieldnames from associated
> models in my $conditions parameter ?
>
> Eg.
>
> I have these associations:
>
> A hasMany B
> B hasMany C
>
> C belongsTo B
> B belongsTo A
>
> I have a search box which submits the user to A/search (controller A,
> action search).
>
> The user is expecting data from all three models in his display,
> according to various conditions on those fields.
>
> I would like to include conditions for all the fields in controller
> A's findAll() .
>
> Can I do something like:
>
> $results = $this->A->findAll ("A.field1 = B.field2 AND C.field3 = 0
> GROUPBY C.field3", ... "rest of params" ...); ?
>
> Thx.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---