I’m in a trap. I use below code for my CListView. i did not found my fast_name, and last_name column in my returned variable $dataProvider.
$criteria = new CDbCriteria(array(
'select' => 'meal_expenses_id, expense_by, first_name, last_name, grant_total, received_datetime',
'join' => 'INNER JOIN member ON member.member_id=expense_by',
'condition'=>'member.mess_id=:mess_id and member.is_active=:isActive',
$dataProvider = new CActiveDataProvider($this, array(
please help me…
Maybe in your select use member.first_name, member.last_name
I would use a relation definition in the model and drop your join an use a ‘with’=> and ‘together’=> instead
Thank you for your reply. I used “member.first_name, member.last_name” after you reply but I am sorry to say that there is no first_name and last_name column in my $dataProvider variable .
I am very very beginner in Yii so if possible please give me an example for this code.
Thanks a lot
What table is first_name, last_name in?
What is the output from print_r($dataProvider)?
Do you have any relations on these tables?
member.member_id, member.first_name, member.last_name coming from member table.
no there is no relation. but i have member_id in my meal table.
there is no record from member table in my output variable $dataProvider.