From d9e1444df5107806ec1a2b524a9062d40567bce4 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 27 Jun 2001 20:43:13 +0000 Subject: [PATCH] bug 434608 --- lib.inc.php3 | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib.inc.php3 b/lib.inc.php3 index 1f163e7c7..c42c3f628 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -487,7 +487,8 @@ function get_table_def($db, $table, $crlf) // modified by Lem9 to allow older MySQL versions to continue to work if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 20){ - $result=mysql_query("show create table " .db_name($db).".$table"); + $result=mysql_query("show create table " .db_name($db)."." + . tbl_name($table)); if ($result!=false && mysql_num_rows($result)>0){ $tmpres=mysql_fetch_array($result); $tmp=$tmpres[1]; @@ -498,7 +499,8 @@ function get_table_def($db, $table, $crlf) $schema_create .= "CREATE TABLE $table ($crlf"; - $result = mysql_query("SHOW FIELDS FROM " .db_name($db).".$table") or mysql_die(); + $result = mysql_query("SHOW FIELDS FROM " .db_name($db)."." + . tbl_name($table)) or mysql_die(); while($row = mysql_fetch_array($result)) { $schema_create .= " $row[Field] $row[Type]"; @@ -512,7 +514,8 @@ function get_table_def($db, $table, $crlf) $schema_create .= ",$crlf"; } $schema_create = ereg_replace(",".$crlf."$", "", $schema_create); - $result = mysql_query("SHOW KEYS FROM " .db_name($db).".$table") or mysql_die(); + $result = mysql_query("SHOW KEYS FROM " .db_name($db)."." . + tbl_name($table)) or mysql_die(); while($row = mysql_fetch_array($result)) { $kname=$row['Key_name']; @@ -568,7 +571,8 @@ function get_table_content ($db, $table, $handler){ // only php >= 4.0.5 - staybyte - 27. June 2001 function get_table_content_fast($db, $table, $handler){ - $result = mysql_query("SELECT * FROM ".db_name($db).".$table") or mysql_die(); + $result = mysql_query("SELECT * FROM ".db_name($db)."." . + tbl_name($table)) or mysql_die(); if ($result!=false){ for($j=0; $j