I have a trouble with AR

I have two table on database with:

tbl_user{

‘id’,‘user’

}

tbl_info_user{

‘id’,‘user_id’,‘status_id’

}

and :user_id is foreign key and references tbl_user table,

and i want to get all the columns in the tbl_user and the status column. i don’t know AR support to it?

Did you read the Definitive Guide to Yii ?

Here is the part that explains the relations - http://www.yiiframework.com/doc/guide/1.1/en/database.arr

Thank you !

I tried with the command line under but it not work.




     public function getAllData(){

            $criterial = new CDbCriteria();

            $criterial -> select =array('tbl_user.id','tbl_user.id','tbl_info status_id');

            $criterial -> with ='account';

            return $this::model()->findAll($criterial);

        }



can you give me an example with this case?

Do you have the relations declared ?

Yse i have a relations declared.