= 40100 && !defined('PMA_MYSQL_CHARSETS_LIB_INCLUDED')) { include('./libraries/mysql_charsets.lib.php3'); } /** * Updates table comment, type and options if required */ if (isset($submitcomment)) { if (empty($prev_comment) || urldecode($prev_comment) != $comment) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' COMMENT = \'' . PMA_sqlAddslashes($comment) . '\''; $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); $message = $strSuccess; } } if (isset($submittype)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' TYPE = ' . $tbl_type; $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); $message = $strSuccess; } if (isset($submitcharset)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' CHARACTER SET = ' . $tbl_charset; $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); $message = $strSuccess; } if (isset($submitoptions)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . (isset($pack_keys) ? ' pack_keys=1': ' pack_keys=0') . (isset($checksum) ? ' checksum=1': ' checksum=0') . (isset($delay_key_write) ? ' delay_key_write=1': ' delay_key_write=0') . (isset($auto_increment) ? ' auto_increment=' . PMA_sqlAddslashes($auto_increment) : ''); $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); $message = $strSuccess; } // Displays a message if a query had been submitted if (isset($message)) { PMA_showMessage($message); } /** * Reordering the table has been requested by the user */ if (isset($submitorderby) && !empty($order_field)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' ORDER BY ' . PMA_backquote(urldecode($order_field)); $result = PMA_mysql_query($sql_query) or PMA_mysqlDie('', $sql_query, '', $err_url); PMA_showMessage($strSuccess); } // end if /** * Gets tables informations and displays top links */ require('./tbl_properties_table_info.php3'); /** * Get columns names */ $local_query = 'SHOW COLUMNS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db); $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $error_url); for ($i = 0; $row = PMA_mysql_fetch_array($result); $i++) { $columns[$i] = $row['Field']; } mysql_free_result($result); /** * Displays the page */ ?>