Merge pull request #23670 from Daviid-P/fix_database_backtick
Encase database name in backticks
This commit is contained in:
commit
84934046b9
@ -678,7 +678,7 @@ class DoliDBMysqli extends DoliDB
|
|||||||
}
|
}
|
||||||
$tmpdatabase = preg_replace('/[^a-z0-9\.\-\_]/i', '', $database);
|
$tmpdatabase = preg_replace('/[^a-z0-9\.\-\_]/i', '', $database);
|
||||||
|
|
||||||
$sql = "SHOW TABLES FROM ".$tmpdatabase." ".$like.";";
|
$sql = "SHOW TABLES FROM `".$tmpdatabase."` ".$like.";";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
$result = $this->query($sql);
|
$result = $this->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user