mirror of
https://github.com/e107inc/e107.git
synced 2025-04-19 20:21:51 +02:00
Fixes #3422 Installation issue with database names containing a hyphen.
This commit is contained in:
parent
cdcd10e7f5
commit
b5157e70cb
@ -194,11 +194,6 @@ class e_db_mysql
|
||||
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
|
||||
{
|
||||
$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
|
||||
{
|
||||
$this->mySQLaccess->query("use ".$database);
|
||||
$this->mySQLaccess->query("use `".$database."`");
|
||||
// $this->mySQLaccess->select_db($database); $dbh->query("use newdatabase");
|
||||
}
|
||||
catch (PDOException $e)
|
||||
@ -1468,7 +1463,8 @@ class e_db_mysql
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user