I am new to Yii framework. So i need help. I have 2 tables
table A
admin_id admin_name
1 aaa
2 sss
3 eee
table B
id admin_id phone_num
1 1 123123123
2 1 234234234
3 2 343434344
So when displaying table B i want to display admin_name from table A instead of admin_id
I have a relation defined in Table B model as
return array('admin' => array(self::BELONGS_TO, 'table A', 'admin_id'),);
I want to use relations concept to get the admin name.
One more important thing is I am not using views of Yii. So i want only controller and model to be used.
Kindly help me out with this issue.