From d5be2c01d44e506066a52ddc2b3d953dfaa475ca Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 28 Apr 2002 11:28:00 +0000 Subject: [PATCH] table info --- ChangeLog | 2 ++ tbl_properties.php3 | 35 ++------------------------------ tbl_properties_export.php3 | 1 + tbl_properties_table_info.php3 | 37 ++++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 33 deletions(-) create mode 100755 tbl_properties_table_info.php3 diff --git a/ChangeLog b/ChangeLog index 9ff8d1d6d..b76bab917 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ $Source$ start the split * tbl_properties.php3, new tbl_properties_export.php3, tbl_properties_links.php3, lang/*.php3: export is splitted + * new tbl_properties_table_info, to be able to display links + on the export page 2002-04-28 Alexander M. Turek * header.inc.php3, lines 162-170: Improved patch #548696. diff --git a/tbl_properties.php3 b/tbl_properties.php3 index 342d52771..1558e25e9 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -67,39 +67,8 @@ if (isset($submitorderby) && !empty($order_field)) { $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); } - -/** - * Gets table informations and displays these informations and also top - * browse/select/insert/empty links - */ -// The 'show table' statement works correct since 3.23.03 -if (PMA_MYSQL_INT_VERSION >= 32303) { - $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\''; - $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); - $showtable = mysql_fetch_array($result); - $tbl_type = strtoupper($showtable['Type']); - $num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0); - $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : ''); -} else { - $local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table); - $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); - $showtable = array(); - $num_rows = mysql_result($result, 0, 'count'); - $show_comment = ''; -} -mysql_free_result($result); - -echo '' . "\n"; -require('./tbl_properties_links.php3'); - -if (!empty($show_comment)) { - ?> - -

- -

- diff --git a/tbl_properties_table_info.php3 b/tbl_properties_table_info.php3 new file mode 100755 index 000000000..1f1536fde --- /dev/null +++ b/tbl_properties_table_info.php3 @@ -0,0 +1,37 @@ += 32303) { + $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\''; + $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); + $showtable = mysql_fetch_array($result); + $tbl_type = strtoupper($showtable['Type']); + $num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0); + $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : ''); +} else { + $local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table); + $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); + $showtable = array(); + $num_rows = mysql_result($result, 0, 'count'); + $show_comment = ''; +} +mysql_free_result($result); + +echo '' . "\n"; +require('./tbl_properties_links.php3'); + +if (!empty($show_comment)) { + ?> + +

+ +

+