I have a table named event(ename,many_other_attributes) where event is the primary key.
I want to generate a drop down menu in YII which includes all the enames in the list.
I am a newbie to YII. Please help
I have a table named event(ename,many_other_attributes) where event is the primary key.
I want to generate a drop down menu in YII which includes all the enames in the list.
I am a newbie to YII. Please help
收起
Try this
echo $form->dropDownList(
$model,
'land_id',
CHtml::listData(Event::model()->findAll(), 'ename', 'ename')
);
报告相同问题?