diff options
Diffstat (limited to 'core/DataAccess')
-rw-r--r-- | core/DataAccess/Model.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/DataAccess/Model.php b/core/DataAccess/Model.php index ba04962ff4..d5da1e33ed 100644 --- a/core/DataAccess/Model.php +++ b/core/DataAccess/Model.php @@ -304,11 +304,12 @@ class Model { // duplicate idarchives are Ignored, see https://github.com/piwik/piwik/issues/987 $query = "INSERT IGNORE INTO " . $tableName . " (" . implode(", ", $fields) . ") - VALUES (?,?,?,?,?,?,?,?)"; + VALUES (?,?,?,?,?,?,?,?) ON DUPLICATE KEY UPDATE " . end($fields) . " = ?"; $bindSql = $record; $bindSql[] = $name; $bindSql[] = $value; + $bindSql[] = $value; Db::query($query, $bindSql); |