From fc15d466b4f8d5cbb8e2eca53eb900d3efce3b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Chans=C3=A9aume?= Date: Thu, 5 Jun 2014 14:01:47 +0200 Subject: [PATCH] Fixed issue when installing Thelia on database with special characters --- core/lib/Thelia/Install/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Install/Database.php b/core/lib/Thelia/Install/Database.php index 9f45e9253..8b20995ff 100644 --- a/core/lib/Thelia/Install/Database.php +++ b/core/lib/Thelia/Install/Database.php @@ -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 ) );