From 3e992a0cb7102adcae48b4537480fe9fc22ef610 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Mon, 14 Apr 2003 09:02:54 +0000 Subject: [PATCH] Usage: SHOW TABLE STATUS FROM db LIKE 'table' not : SHOW TABLE STATUS LIKE 'table' FROM 'db'. Note absence of '' around "db" and the FROM/LIKE order. This time right, I hope. ;) --- libraries/common.lib.php3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 9b4df328b..d6f7883f7 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -1224,7 +1224,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} { global $err_url, $cfg; if (PMA_MYSQL_INT_VERSION >= 32303) { - $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\' FROM \'' . PMA_sqlAddslashes($db, TRUE) . '\''; + $local_query = 'SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\''; $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); $showtable = PMA_mysql_fetch_array($result); $num = (isset($showtable['Rows']) ? $showtable['Rows'] : 0); @@ -1277,7 +1277,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} // Corrects the tooltip text via JS if required else if (!empty($GLOBALS['table']) && $cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303) { - $result = @PMA_mysql_query('SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\' FROM ' . PMA_backquote($GLOBALS['db'])); + $result = @PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\''); if ($result) { $tbl_status = PMA_mysql_fetch_array($result, MYSQL_ASSOC); $tooltip = (empty($tbl_status['Comment']))