Look into using the Containable behaviour, that will make it easier
for you in the future, when finding related data.
http://book.cakephp.org/view/474/Containable
The Poll find will then include the contain array - example:
[example]
'contain' => array(
'Section' => array(
'Question'
)
)
[/example]
The above will give you all the Poll records with all the related
Section records and for each Section all the related Question records.
Enjoy,
John
On Mar 22, 3:35 am, stefano <[email protected]> wrote:
> Hello
>
> I have a question about find('all') i need get all the records that
> have any relation in the database for example
>
> polls hasmany sections
> sections hasmany questions
>
> i need all the polls that have any sections and this section have any
> questions
>
> any idea how do that using the cake's way?
>
> s.
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
To unsubscribe from this group, send email to
cake-php+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.