Escape table names in migration script

This commit is contained in:
Olivier Perez [a570709] 2015-08-13 10:00:45 +02:00
parent 597b02e5af
commit 28e94447eb

View File

@ -58,8 +58,8 @@ CREATE TABLE IF NOT EXISTS `' . $prefixedMigrationTable . '` (
DEFAULT CHARSET = utf8;'); DEFAULT CHARSET = utf8;');
} }
$selectStmt = $pdo->prepare('SELECT id FROM ' . $prefixedMigrationTable . ' WHERE name=?'); $selectStmt = $pdo->prepare('SELECT id FROM `' . $prefixedMigrationTable . '` WHERE name=?');
$insertStmt = $pdo->prepare('INSERT INTO ' . $prefixedMigrationTable . ' (name) VALUES (?)'); $insertStmt = $pdo->prepare('INSERT INTO `' . $prefixedMigrationTable . '` (name) VALUES (?)');
$countSucceeded = 0; $countSucceeded = 0;
$countFailed = 0; $countFailed = 0;
$countSkipped = 0; $countSkipped = 0;