Showing a relation table column in view from dataProvider

In my controller I have


$dataProvider=new CActiveDataProvider('table', array(

    'criteria'=>array(

'select' => array(

                       

                        'no','abc0.abc_name as cd')

                       ,

        'condition'=>'no ='.$session['no'].'  and abc ='.$session['abc'].' 

        'order'=>'no DESC',

    'with'=>array('abc0'),

'join' => 'JOIN abc_master ON abc_master.abc_id=abc',


                        

                       

    ),

    'pagination'=>array(

        'pageSize'=>2,

    ),

));









<?php 

 $this->widget('zii.widgets.CListView', array(

'dataProvider'=>$dataProvider,

'itemView'=>'_results',

'enablePagination'=>true,




)); 

Now In my view I have




	<?php echo CHtml::encode($data['no']); ?>






for showing first column.

How will I show abc_name which belongs to abc_master or the foreign key relation abc0 ?

The syntax you should use is




$data->no

$data->abc0->someAttribute



/Tommy

Thanks that was very helpful

One more thing is the above code I have written the best way to get the value of abc_name knowing that ‘table’ has a relation ‘abc0’ and there is also a join


'join' => 'JOIN abc_master ON abc_master.abc_id=abc',