Quantcast
Channel: Shani's Php CookBook
Viewing all articles
Browse latest Browse all 60

Yii, update record (update query) method

$
0
0
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'");

Viewing all articles
Browse latest Browse all 60

Trending Articles