How can I update field with query builder in Yii2? I can't find this in documentation.
Thanks!
UPD
This is the solution:
// UPDATE
$connection = Yii::$app->db;
$connection->createCommand()->update('user', ['status' => 1], 'age > 30')->execute();
Create command can be used directly as follows :
\Yii::$app->db->createCommand("UPDATE table SET column1=:column1, column2=:column2 WHERE id=:id")
->bindValue(':id', your_id)
->bindValue(':column1', :column1_value)
->bindValue(':column2', :column2_value)
->execute();