]> git.joonet.de Git - adminer.git/commitdiff
Prepare for multi insertUpdate()
authorJakub Vrana <jakub@vrana.cz>
Tue, 9 Jul 2013 18:01:21 +0000 (11:01 -0700)
committerJakub Vrana <jakub@vrana.cz>
Tue, 9 Jul 2013 18:01:21 +0000 (11:01 -0700)
adminer/drivers/mysql.inc.php

index d2c936c074c62245b962491801edda7efbbe51c7..a8cd9e34319534fe4162d7ca0c24c5743d143386 100644 (file)
@@ -239,7 +239,7 @@ if (!defined("DRIVER")) {
                
                function insertUpdate($table, $set, $primary) {
                        foreach ($set as $key => $val) {
-                               $set[$key] = "$key = $val";
+                               $set[$key] = "$key = VALUES($key)";
                        }
                        $update = implode(", ", $set);
                        return queries("INSERT INTO " . table($table) . " SET $update ON DUPLICATE KEY UPDATE $update");