From 4aa84923a5ac1f6c1ff498b8ee1b65c03efc8239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Wed, 1 May 2002 08:14:43 +0000 Subject: [PATCH] Comments --- ChangeLog | 3 +++ tbl_properties.php3 | 7 +++++-- tbl_properties_table_info.php3 | 23 +++++++++++++++-------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index c30471f74..86cf372d3 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-05-01 Loïc Chapeaux + * tbl_properties.php3; , tbl_properties_table_info.php3: comments. + 2002-04-30 Loïc Chapeaux * lang/italian.inc.php3: updated thanks to Pietro Danesi. diff --git a/tbl_properties.php3 b/tbl_properties.php3 index d9f79fa6d..b39d9c737 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -34,6 +34,7 @@ if (isset($show_query) && $show_query == 'y') { } unset($sql_query); + /** * Updates table type, comment and order if required */ @@ -55,6 +56,7 @@ if (isset($submitorderby) && !empty($order_field)) { $local_query = 'ALTER TABLE ' . PMA_backquote($table) . 'ORDER BY ' . $order_field; $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); } + /** * Update table options */ @@ -67,7 +69,9 @@ if (isset($submitoptions)) { } - +/** + * Prepares the table structure display + */ // 1. Get table information require('./tbl_properties_table_info.php3'); @@ -87,7 +91,6 @@ while ($row = mysql_fetch_array($result)) { } // end while mysql_free_result($result); - // 3. Get fields $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table); $fields_rs = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); diff --git a/tbl_properties_table_info.php3 b/tbl_properties_table_info.php3 index b3634bddc..769e8cc73 100755 --- a/tbl_properties_table_info.php3 +++ b/tbl_properties_table_info.php3 @@ -1,9 +1,9 @@ = 32303) { @@ -15,17 +15,16 @@ if (PMA_MYSQL_INT_VERSION >= 32303) { $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : ''); // better logic, thanks to Loic: - $tmp = explode(' ', $showtable['Create_options']); - $tmp_cnt = count($tmp); + $tmp = explode(' ', $showtable['Create_options']); + $tmp_cnt = count($tmp); for ($i = 0; $i < $tmp_cnt; $i++) { - $tmp1 = explode('=', $tmp[$i]); + $tmp1 = explode('=', $tmp[$i]); if (isset($tmp1[1])) { $$tmp1[0] = $tmp1[1]; } - } + } // end for unset($tmp1); unset($tmp); - } else { $local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table); $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); @@ -35,9 +34,17 @@ if (PMA_MYSQL_INT_VERSION >= 32303) { } mysql_free_result($result); + +/** + * Displays top menu links + */ echo '' . "\n"; require('./tbl_properties_links.php3'); + +/** + * Displays table comment + */ if (!empty($show_comment)) { ?> @@ -45,6 +52,6 @@ if (!empty($show_comment)) {