I have a situation where I need to make use of INSERT or REPLACE MySQL syntax.
How can I do that with Yii objects?
I have a situation where I need to make use of INSERT or REPLACE MySQL syntax.
How can I do that with Yii objects?
Read a bit the definitive guide about active record.
You can do like that:
$model= new MyTable;
$model->field=$value;
$model->save();