PLEASE HELP....I AM A NEWBIE
I have 2 tables PAGE and COMMENT.
Page table has columns
$id
user_id
$content
Comment table has columns
$id
$user_id
$page_id
$date_entered
$comment The comment column consist of an array of comments as one user can have many comments
In the Page model the relation in the relation() is defined as
'comments' => array(self::HAS_MANY, 'Comment', 'page_id'),
Now in the PageControllor.php,I have defined this query in the actionView()
$page = Page::model()->with('user','comments')->findByPk($id);
Now my question is
** how can i get the result of this query in $result so that i could pass it to the view page as
$this->render('view',array(
'model'=>$this->loadModel($id),'result'=>$result))