diff --git a/core/Db.php b/core/Db.php index 826a4afa12ea0ca82cd5b42b17d08de197efce44..fb2161ac1dbfdc955dd0d83e23a25259387eb7ad 100644 --- a/core/Db.php +++ b/core/Db.php @@ -338,7 +338,7 @@ class Db $tables = array($tables); } - return self::query("DROP TABLE " . implode(',', $tables)); + return self::query("DROP TABLE `" . implode('`,`', $tables) . "`"); } /** diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index ff44b7dbb22cba114643225526a1b7e934fd6ac3..5d00f6b0d2c6da5f393a802f2ad8270bf7950d67 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -1002,7 +1002,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase $rowsSql[] = "(" . implode(',', $values) . ")"; } - $sql = "INSERT INTO $table VALUES " . implode(',', $rowsSql); + $sql = "INSERT INTO `$table` VALUES " . implode(',', $rowsSql); Db::query($sql, $bind); } } @@ -1013,7 +1013,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase public static function deleteArchiveTables() { foreach (ArchiveTableCreator::getTablesArchivesInstalled() as $table) { - Db::query("DROP TABLE IF EXISTS $table"); + Db::query("DROP TABLE IF EXISTS `$table`"); } ArchiveTableCreator::refreshTableList($forceReload = true);