Yii, update record (update query) method

Update By Primary KeyModel::model()->updateByPk($Model->id,array(“status”=>’ok’)); Update All RowsModel::model()->updateAll(array(‘user’=>”$userid”,’date’=>$currenttime),”status=>’ok'”);