public static final function BulkInsertFlush() { if (!self::$m_bBulkInsert) { return; } foreach (self::$m_aBulkInsertCols as $sClass => $aTables) { foreach ($aTables as $sTable => $sColumns) { $sValues = implode(', ', self::$m_aBulkInsertItems[$sClass][$sTable]); $sInsertSQL = "INSERT INTO `{$sTable}` ({$sColumns}) VALUES {$sValues}"; $iNewKey = CMDBSource::InsertInto($sInsertSQL); } } // Reset self::$m_aBulkInsertItems = array(); self::$m_aBulkInsertCols = array(); self::$m_bBulkInsert = false; }