Yii, update record (update query) method By Shani July 27, 2012 Update By Primary Key Model::model()->updateByPk($Model->id,array("status"=>'ok')); Update All Rows Model::model()->updateAll(array('user'=>"$userid",'date'=>$currenttime),"status=>'ok'"); Read more