mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Fixes #3422 Installation issue with database names containing a hyphen.
This commit is contained in:
@@ -194,11 +194,6 @@ class e_db_mysql
|
|||||||
list($this->mySQLserver,$this->mySQLport) = explode(':',$mySQLserver,2);
|
list($this->mySQLserver,$this->mySQLport) = explode(':',$mySQLserver,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if($this->mySQLserver === 'localhost') // problematic.
|
|
||||||
{
|
|
||||||
// $this->mySQLserver = '127.0.0.1'; // faster by almost 1 second
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=".$this->mySQLport, $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=".$this->mySQLport, $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||||
@@ -371,7 +366,7 @@ class e_db_mysql
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$this->mySQLaccess->query("use ".$database);
|
$this->mySQLaccess->query("use `".$database."`");
|
||||||
// $this->mySQLaccess->select_db($database); $dbh->query("use newdatabase");
|
// $this->mySQLaccess->select_db($database); $dbh->query("use newdatabase");
|
||||||
}
|
}
|
||||||
catch (PDOException $e)
|
catch (PDOException $e)
|
||||||
@@ -1468,7 +1463,8 @@ class e_db_mysql
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->dbError("db_Update ($query)");
|
$query = 'UPDATE '.$this->mySQLPrefix.$table.' SET '.$new_data.$vars.' '.$arg;
|
||||||
|
$this->dbError("Error in deprecated db_UpdateArray method query:($query)");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user