From 153b670d77c9d14c755d752233bec593de389b1d Mon Sep 17 00:00:00 2001 From: Steve Alberty Date: Mon, 11 Jun 2001 12:21:55 +0000 Subject: [PATCH] fixed small bugs with table type --- tbl_properties.php3 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tbl_properties.php3 b/tbl_properties.php3 index 0018e25e5..6532feb49 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -20,19 +20,22 @@ mysql_select_db($db); // 'show table' works correct since 3.23.03 if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION)>=3) { + if(isset($submitcomment)) + $result = mysql_query("ALTER TABLE $table comment='$comment'") or mysql_die(); + if(isset($submittype)){ + $result = mysql_query("ALTER TABLE $table TYPE=$tbl_type") or mysql_die(); + } + $result = mysql_query("SHOW TABLE STATUS LIKE '$table'") or mysql_die(); $showtable = mysql_fetch_array($result); $show_comment=$showtable['Comment']; - $tbl_type=strtoupper($showtable['Type']); - if(isset($submitcomment)) - $result = mysql_query("ALTER TABLE $table comment='$comment'") or mysql_die(); - if(isset($submittype)) - $result = mysql_query("ALTER TABLE $table TYPE=$tbl_type") or mysql_die(); if (!empty($showtable['Comment'])){ echo "" . $showtable['Comment'] . "

\n"; $show_comment=$showtable['Comment']; } + + $tbl_type=strtoupper($showtable['Type']); } $result = mysql_query("SHOW KEYS FROM $table") or mysql_die(); @@ -501,7 +504,7 @@ if(MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION)>=22)