mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Bug: could not use mysql reserved words for table names (e.g. 'Change')
SVN:trunk[547]
This commit is contained in:
@@ -790,7 +790,7 @@ abstract class DBObject
|
||||
if (count($aValuesToWrite) == 0) return false;
|
||||
|
||||
$sTable = MetaModel::DBGetTable($sTableClass);
|
||||
$sInsertSQL = "INSERT INTO $sTable (".join(",", $aFieldsToWrite).") VALUES (".join(", ", $aValuesToWrite).")";
|
||||
$sInsertSQL = "INSERT INTO `$sTable` (".join(",", $aFieldsToWrite).") VALUES (".join(", ", $aValuesToWrite).")";
|
||||
|
||||
$iNewKey = CMDBSource::InsertInto($sInsertSQL);
|
||||
// Note that it is possible to have a key defined here, and the autoincrement expected, this is acceptable in a non root class
|
||||
|
||||
Reference in New Issue
Block a user