How To Save Tabular Input To Db?


I’ve been working through the tutorial on updating tabular input (http://www.yiiframew…1/en/form.table) and I’ve got the front end part working. I don’t know how to write the controller though so that it saves each model back to the database.

I inserted my best guess below of:


That gets me an error of:

“Property ‘Task.value’ is not defined.”

Please explain how I would go about this. I’m very new to PHP and Yii so please be thorough.

public function actionUpdateBetaTaskList($id)


//gets an array of tasks to update

$tasks = Task::model()->findAll(‘bdList=:bdList’, array(’:bdList’=>1));



foreach($tasks as $i=>$task)












U have some problem in ur table column (value) either in model or db table…

The “save()” method belongs to CActiveRecord, not to CModel, that’s why we cannot save. I am trying to save new data onto my CModel and I don’t know how… I guess I’ll keep looking.