From b91ee9e8225da1f445e210fb6662f1c7a733ee76 Mon Sep 17 00:00:00 2001 From: e-dschungel Date: Sun, 29 Jan 2017 23:01:57 +0100 Subject: [PATCH] fixed quotation in emulation of mysql_list_tables using SHOW TABLES --- inc/functions_imexport.php | 2 +- inc/functions_sql.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/functions_imexport.php b/inc/functions_imexport.php index 7cf7008..b8360df 100644 --- a/inc/functions_imexport.php +++ b/inc/functions_imexport.php @@ -206,7 +206,7 @@ function ImportCreateTable() { global $sql,$lang,$db,$config; $tbl=Array(); - $tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM $db"); + $tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM `$db`"); $num_tables=mysqli_num_rows($tabellen); for ($i=0; $i < $num_tables; $i++) { diff --git a/inc/functions_sql.php b/inc/functions_sql.php index b0c1c54..d9f4052 100644 --- a/inc/functions_sql.php +++ b/inc/functions_sql.php @@ -97,7 +97,7 @@ function Table_ComboBox() function TableComboBox($default='') { global $db,$config,$lang,$nl; - $tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM $db"); + $tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM `$db`"); $num_tables=mysqli_num_rows($tabellen); $s='' . $nl; for ($i=0; $i < $num_tables; $i++) @@ -207,7 +207,7 @@ function DB_Copy($source, $destination, $drop_source=0, $insert_data=1) } } $SQL_Array.="USE `$destination` ;\n"; - $tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM $source"); + $tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM `$source`"); $num_tables=mysqli_num_rows($tabellen); for ($i=0; $i < $num_tables; $i++) {