Fixed issue when installing Thelia on database with special characters

This commit is contained in:
Julien Chanséaume
2014-06-05 14:01:47 +02:00
parent 17f22d920c
commit fc15d466b4

View File

@@ -65,7 +65,7 @@ class Database
public function insertSql($dbName = null, array $extraSqlFiles = null)
{
if ($dbName) {
$this->connection->query(sprintf("use %s", $dbName));
$this->connection->query(sprintf("use `%s`", $dbName));
}
$sql = array();
@@ -146,7 +146,7 @@ class Database
{
$this->execute(
sprintf(
"CREATE DATABASE IF NOT EXISTS %s CHARACTER SET utf8",
"CREATE DATABASE IF NOT EXISTS `%s` CHARACTER SET utf8",
$dbName
)
);