From 5e472df4e4da13a87a9e702adef66b4ec00ad0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sun, 28 Apr 2002 17:45:43 +0000 Subject: [PATCH] Moved tables comments and type fetaure and referential integrity checkings to the "table operations" page --- ChangeLog | 3 + tbl_properties.php3 | 174 ------------------------------- tbl_properties_operations.php3 | 184 +++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+), 174 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc11e3be9..ce043f669 100755 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,9 @@ $Source$ * tbl_addfield.php3; tbl_alter.php3: fixed bug #548495 - Alter table not replicate. * db_stats.php3; libraries/functions.js: added a check/uncheck all feature. + * tbl_properties.php3; tbl_properties_operations.php3: moved tables + comments and type features and referential integrity checkings to the + "table operations" page. 2002-04-27 Marc Delisle * tbl_properties.php3, new tbl_properties_links.php3: diff --git a/tbl_properties.php3 b/tbl_properties.php3 index 64918ef4a..b4c4b0e69 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -110,12 +110,10 @@ $fields_cnt = mysql_num_rows($fields_rs); - -
  • -
    - - - - -  : - - - -
    -
  • - -= 32334) { - ?> - -
  • -
    - - - - -  : - - -   -
    -
  • - @@ -664,127 +611,6 @@ if ($is_upload) { = 32322) { -?> - -
  • -
    - - - - -  :  -   - " class="textfield" style="vertical-align: middle" onfocus="this.select()" />  - -
    -
  • - - - 0) { - while ($tmp = mysql_fetch_array($result)) { - if (isset($tmp['Variable_name'])) { - switch ($tmp['Variable_name']) { - case 'have_bdb': - if ($tmp['Value'] == 'YES') { - $tbl_bdb = TRUE; - } - break; - case 'have_gemini': - if ($tmp['Value'] == 'YES') { - $tbl_gemini = TRUE; - } - break; - case 'have_innodb': - if ($tmp['Value'] == 'YES') { - $tbl_innodb = TRUE; - } - break; - case 'have_isam': - if ($tmp['Value'] == 'YES') { - $tbl_isam = TRUE; - } - break; - } // end switch - } // end if isset($tmp['Variable_name']) - } // end while - } // end if $result - - mysql_free_result($result); - echo "\n"; - ?> -
  • -
    - - - - -  :  -   -   - -
    -
  • - = 3.23.22 - -// Referential integrity check -if (!empty($cfg['Server']['relation'])) { - - $local_query = 'SELECT master_field, foreign_table, foreign_field' - . ' FROM ' . $cfg['Server']['relation'] - . ' WHERE master_table = \'' . $table . '\';'; - - // we need this mysql_select_db if the user has access to more than one db - // and $db is not the last of the list, because PMA_availableDatabases() - // has made a mysql_select_db() on the last one - mysql_select_db($db); - - $result = @mysql_query($local_query); - - if ($result != FALSE && mysql_num_rows($result) > 0) { - ?> - -
  • -
    -
    - ' . $rel[0] . ' -> ' . $rel[1] . '.' . $rel[2] - . '
    ' . "\n"; - } // end while - ?> -
    -

  • - diff --git a/tbl_properties_operations.php3 b/tbl_properties_operations.php3 index 994cb5a9d..2000f02c3 100755 --- a/tbl_properties_operations.php3 +++ b/tbl_properties_operations.php3 @@ -4,8 +4,70 @@ require('./tbl_properties_common.php3'); require('./tbl_properties_table_info.php3'); + +// Get columns names +$local_query = 'SHOW COLUMNS FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table); +$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $error_url); +for ($i = 0; $row = mysql_fetch_array($result); $i++) { + $columns[$i] = $row['Field']; +} +mysql_free_result($result); ?>