Yii2 also provide update method for update the table records.
In below example we are just updating the single record with where condition.
How to update record in Yii2
Yii::$app->db->createCommand()
->update('tblName', ['name' => 'Ram'], ['id'=> 4])
->execute();
Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
ReplyDeleteDedicated Yii Framework developers in India