hello i want to ask::
sorry before my english is not good ^^
I have a table
BSC
: Id, name, type
BSC_TYPE
: Id, name
foreing key bsc (type) references bsc_type (id)
in BSC-type display that’s its contents ID of BSC_TYPE
I want to display the [BSC TYPE] to [NAME of BSC_TYPE]
This example of my code
$session=new CHttpSession;
$session->open();
$columns[]=array(
'name'=>'name',
'value'=>'$data->name',
);
$columns[]=array(
'name'=>'desc',
'value'=>'$data->desc',
);
$columns[]=array(
'name'=>'type',
'value'=>'$data->type',//<<the value i want to change
);
$columns[]=array(
'name'=>'ip_address',
'value'=>'$data->ip_address',
);
$columns[]=array(
'name'=>'port',
'value'=>'$data->port',
);
if($session['id'] != "")
{
if(Yii::app()->user->isAdmin())
{
$columns[]=array(
'header'=>'Action',
'class'=>'CButtonColumn',
);
}
else
{
$columns[]=array(
'header'=>'Action',
'class'=>'CButtonColumn',
'template'=>'{view}',
'buttons'=>array
(
'view'=>array(
'label'=>'view',
'url'=>'Yii::app()->createUrl("Bsc/view", array("id"=>$data->id))',
),
),
);
}
}
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'bsc-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
//'cssFile'=>false,
'columns'=>$columns,
));
somebody please help me…^^