We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 732dd68 commit 0f0e459Copy full SHA for 0f0e459
user_guide_src/source/database/query_builder/092.php
@@ -32,6 +32,12 @@
32
->onConstraint(new RawSql('`mytable`.`title` = `u`.`title` AND `mytable`.`author` = `u`.`author`'))
33
->updateFields(['last_update' => new RawSql('CURRENT_TIMESTAMP()')], true)
34
->updateBatch();
35
+
36
+// OR
37
+foreach ($data as $row) {
38
+ $builder->setData($row);
39
+}
40
+$builder->onConstraint('title, author')->updateBatch();
41
/*
42
* Produces:
43
* UPDATE `mytable`
0 commit comments