I’ve been updating one of my apps with the current version of Yii and am having problems with an update routine that takes user content and updates the database table accordingly. It basically does no update but doesn’t cause any errors. The result is returned as 0. I’m not sure what is wrong with it so hopefully someone can see the error.
Here is the piece of code that performs update.
return Yii::app()->db->createCommand("UPDATE narratives SET description = '$this->description', content = '$this->content' WHERE id = '$this->id'")->execute();