Skip to content

Commit ccfc84e

Browse files
author
Marius Cramer
committed
- Fixed missing quotes on db selection
1 parent b8cdf90 commit ccfc84e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

interface/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function __construct($prefix = '') {
8686
$this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!');
8787
return false;
8888
}
89-
if(!((bool)mysqli_query( $this->_iConnId, "USE $this->dbName"))) {
89+
if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) {
9090
$this->close();
9191
$this->_sqlerror('Datenbank nicht gefunden / Database not found');
9292
return false;

server/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function __construct($host = NULL , $user = NULL, $pass = NULL, $database
8686
$this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!');
8787
return false;
8888
}
89-
if(!((bool)mysqli_query( $this->_iConnId, "USE $this->dbName"))) {
89+
if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) {
9090
$this->close();
9191
$this->_sqlerror('Datenbank nicht gefunden / Database not found');
9292
return false;

0 commit comments

Comments
 (0)