I have two tables, a posts table, and a periods table.
The posts table has a user_id, title, body, period.
The periods table has a user_id, title, period.
I can easily get the information from the posts table in my
PostsController.php:
$this->set('period1', $this->Post->find('all', array(
'conditions'=>array('user_id'=>$this->Session-
>read('Auth.User.id'), 'class_period'=>1)
)));
But I cannot get the information from the periods table. I think this
would be the equivalent of a Left Join?
I would like to echo all periods with a user_id that matches the
(Auth.User.id).
Thanks!
--
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
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php