$query->update('users', [
'username' => 'John Doe',
'status' => 'new status'
])
->where([['id', '=', 7]])
->limit()
->go();
or since v0.3.4
$query->update('users', [
'username' => 'John Doe',
'status' => 'new status'
])
->where([['id', 7]])
->limit()
->go();
Result query
UPDATE `users` SET `username` = 'John Doe', `status` = 'new status'
WHERE `id` = 7 LIMIT 1;
$query->update('posts', ['status' => 'published'])
->where([['YEAR(`updated_at`)', '>', 2020]])
->go();
Result query
UPDATE `posts` SET `status` = 'published'
WHERE (YEAR(`updated_at`) > 2020);
To the DELETE section