I have two tables. t(Requests), t(steps)
t(steps) has two columns. id, name
t(Requests.steps) contains a:3:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"5";}
the "1","2","5" are IDs in t(steps)
1=>PreMod
2=>Apply
3=>Test
4=>Backout
5=>Commit
In CDetailView, I want to be able to show
Steps: PreMod, Apply, Commit
How do I write the column array for Steps?
$this->widget("zii.widgets.CDetailView', array(
'data'=>$model,
'attributes' => array(
'id',
'approver',
'abstract',
array(
'label'=>'MOP',
'value'=>(Mop::model()->find("id=:id", array(':id"=>$model->mop))->mopID),
),
array(
'label'=>'Steps',
'value'=>(Steps::model()->find("id=:id", array(':id"=>unserialize($model->steps))->name),
),
),
);
This isn’t doing what I thought it would do or I am just trying to do everything in one step.
'value'=>(Steps::model()->find("id=:id", array(':id"=>unserialize($model->steps))->name)
Any takers?