This might be what you are looking for.
The Containable behavior will do the job.

$options = array(
        'conditions' => array('User.id' => 7),
        'contain' => array(
                'Site' => array('fields' => array('id', 'title'))
        )
);
$results = $this->User->find('all', $options);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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