我被困在CGridView yii中的一個問題,我的退款字段顯示0/1,但我想要顯示「是」如果0和「否」如果是1,而不使用任何第二個表。如何根據標誌字段0/1顯示「是/否」CGridView yii?
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'transaction-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
'member_id',
array(
'header' => 'MemberName',
'name' => 'member_id',
'value' => '$data->member->f_name'
),
'refund',
'band_id',
array(
'class'=>'CButtonColumn',
'template'=>'{view}',
),
),
));
我得到以下錯誤:'包括($數據 - >批准的Yii :: T( '應用', '是'):Yii的。 php):未能打開流:沒有這樣的文件或目錄。 – SPRBRN 2013-09-04 08:21:08
你應該檢查你的腳本爲什麼組成這個醜陋的文件名,這是一些類型的PHP代碼。 – Pentium10 2013-09-11 17:34:58
更好/完整答案低於 – redDevil 2015-01-06 19:14:51