mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
MySQL: Fix for insert with '_DUPLICATE_KEY_UPDATE'
This commit is contained in:
@@ -859,6 +859,7 @@ class e_db_mysql
|
||||
$arg = array_merge($arg, $this->getFieldDefs($tableName));
|
||||
}
|
||||
|
||||
$argUpdate = $arg; // used when DUPLICATE_KEY_UPDATE is active;
|
||||
|
||||
|
||||
// Handle 'NOT NULL' fields without a default value
|
||||
@@ -899,7 +900,7 @@ class e_db_mysql
|
||||
if($DUPEKEY_UPDATE === true)
|
||||
{
|
||||
$query .= " ON DUPLICATE KEY UPDATE ";
|
||||
$query .= $this->_prepareUpdateArg($tableName, $arg);
|
||||
$query .= $this->_prepareUpdateArg($tableName, $argUpdate);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user