Yii Update Tutorials

Yii createCommand Update

Functions function update($table, $columns, $conditions='', $params=array()) SampleThe update() method builds and executes an UPDATE SQL statement. <?php $user=Yii::app()->db->createCommand() ->update( 'tbl_user', array( 'username'=>'bsourcecode', ), 'user_id=:id', array(':id'=>1) ); ?> Output UPDATE `tbl_user` SET `username`=:username WHERE user_id=:id... Read More »