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