= 40100 && !defined('PMA_MYSQL_CHARSETS_LIB_INCLUDED')) { include('./libraries/mysql_charsets.lib.php3'); } /** * Drop multiple fields if required */ // workaround for IE problem: if (isset($submit_mult_change_x)) { $submit_mult = $strChange; } if (isset($submit_mult_drop_x)) { $submit_mult = $strDrop; } if ((!empty($submit_mult) && isset($selected_fld)) || isset($mult_btn)) { $action = 'tbl_properties_structure.php3'; $err_url = 'tbl_properties_structure.php3?' . PMA_generate_common_url($db, $table); include('./mult_submits.inc.php3'); } /** * Runs common work */ require('./tbl_properties_common.php3'); $url_query .= '&goto=tbl_properties_structure.php3&back=tbl_properties_structure.php3'; /** * Prepares the table structure display */ // 1. Get table information/display tabs require('./tbl_properties_table_info.php3'); /** * Show result of multi submit operation */ if ((!empty($submit_mult) && isset($selected_fld)) || isset($mult_btn)) { PMA_showMessage($strSuccess); } // 2. Gets table keys and retains them $local_query = 'SHOW KEYS FROM ' . PMA_backquote($table); $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); $primary = ''; $ret_keys = array(); $pk_array = array(); // will be use to emphasis prim. keys in the table view while ($row = PMA_mysql_fetch_array($result)) { $ret_keys[] = $row; // Backups the list of primary keys if ($row['Key_name'] == 'PRIMARY') { $primary .= $row['Column_name'] . ', '; $pk_array[$row['Column_name']] = 1; } } // end while mysql_free_result($result); // 3. Get fields $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table); $fields_rs = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); $fields_cnt = mysql_num_rows($fields_rs); /** * Displays the table structure ('show table' works correct since 3.23.03) */ ?>
= 40100 ? ' ' . "\n" : ''; ?> = 4.1) unset($field_charset); if (PMA_MYSQL_INT_VERSION >= 40100) { if ((substr($type, 0, 4) == 'char' || substr($type, 0, 7) == 'varchar' || substr($type, 0, 4) == 'text' || substr($type, 0, 8) == 'tinytext' || substr($type, 0, 10) == 'mediumtext' || substr($type, 0, 8) == 'longtext' || substr($type, 0, 3) == 'set' || substr($type, 0, 4) == 'enum' ) && !$binary) { if (strpos($type, ' character set ')) { $type = substr($type, 0, strpos($type, ' character set ')); } if (!empty($row['Collation'])) { $field_charset = $row['Collation']; } else { $field_charset = ''; } } else { $field_charset = ''; } } // garvin: Display basic mimetype [MIME] if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) { $type_mime = '
MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']); } else { $type_mime = ''; } $strAttribute = ' '; if ($binary) { $strAttribute = 'BINARY'; } if ($unsigned) { $strAttribute = 'UNSIGNED'; } if ($zerofill) { $strAttribute = 'UNSIGNED ZEROFILL'; } if (!isset($row['Default'])) { if ($row['Null'] != '') { $row['Default'] = 'NULL'; } } else { $row['Default'] = htmlspecialchars($row['Default']); } $field_encoded = urlencode($row['Field']); $field_name = htmlspecialchars($row['Field']); // garvin: underline commented fields and display a hover-title (CSS only) $comment_style = ''; if (isset($comments_map[$row['Field']])) { $field_name = '' . $field_name . ''; } if (isset($pk_array[$row['Field']])) { $field_name = '' . $field_name . ''; } echo "\n"; $titles = array(); if ($cfg['PropertiesIconic'] == true) { // We need to copy the value or else the == 'both' check will always return true $propicon = (string)$cfg['PropertiesIconic']; if ($propicon == 'both') { $iconic_spacer = ''; } else { $iconic_spacer = ''; } $titles['Change'] = $iconic_spacer . '' . $strChange . ''; $titles['Drop'] = $iconic_spacer . '' . $strDrop . ''; $titles['NoDrop'] = $iconic_spacer . '' . $strDrop . ''; $titles['Primary'] = $iconic_spacer . '' . $strPrimary . ''; $titles['Index'] = $iconic_spacer . '' . $strIndex . ''; $titles['Unique'] = $iconic_spacer . '' . $strUnique . ''; $titles['IdxFulltext'] = $iconic_spacer . '' . $strIdxFulltext . ''; $titles['NoPrimary'] = $iconic_spacer . '' . $strPrimary . ''; $titles['NoIndex'] = $iconic_spacer . '' . $strIndex . ''; $titles['NoUnique'] = $iconic_spacer . '' . $strUnique . ''; $titles['NoIdxFulltext'] = $iconic_spacer . '' . $strIdxFulltext . ''; if ($propicon == 'both') { $titles['Change'] .= ' ' . $strChange . ''; $titles['Drop'] .= ' ' . $strDrop . ''; $titles['NoDrop'] .= ' ' . $strDrop . ''; $titles['Primary'] .= ' ' . $strPrimary . ''; $titles['Index'] .= ' ' . $strIndex . ''; $titles['Unique'] .= ' ' . $strUnique . ''; $titles['IdxFulltext' ] .= ' ' . $strIdxFulltext . ''; $titles['NoPrimary'] .= ' ' . $strPrimary . ''; $titles['NoIndex'] .= ' ' . $strIndex . ''; $titles['NoUnique'] .= ' ' . $strUnique . ''; $titles['NoIdxFulltext'] .= ' ' . $strIdxFulltext . ''; } } else { $titles['Change'] = $strChange; $titles['Drop'] = $strDrop; $titles['NoDrop'] = $strDrop; $titles['Primary'] = $strPrimary; $titles['Index'] = $strIndex; $titles['Unique'] = $strUnique; $titles['IdxFulltext'] = $strIdxFulltext; $titles['NoPrimary'] = $strPrimary; $titles['NoIndex'] = $strIndex; $titles['NoUnique'] = $strUnique; $titles['NoIdxFulltext'] = $strIdxFulltext; } ?> = 40100 ? ' ' . "\n" : '' ?> = 32323) { if ((!empty($tbl_type) && $tbl_type == 'MYISAM') && ($type == 'text' || strpos(' ' . $type, 'varchar'))) { echo "\n"; ?>
   ' . $strCharset . '
/>    > ' . (empty($field_charset) ? ' ' : '' . $field_charset . '') . '       1) { echo "\n"; ?>
<?php echo $strWithChecked; ?>  /         */ /* IE has trouble with ' . "\n"; } else { echo ' ' . (($propicon == 'both') ? ' ' . $strChange : '') . "\n"; } // Drop button if there is at least two fields if ($fields_cnt > 1) { if (PMA_USR_BROWSER_AGENT != 'IE') { echo ' ' . "\n"; } else { echo ' ' . (($propicon == 'both') ? ' ' . $strDrop : '') . "\n"; } } } else { echo ' ' . "\n"; // Drop button if there is at least two fields if ($fields_cnt > 1) { echo '  ' . $strOr . ' ' . "\n" . ' ' . "\n"; } } ?>
20) { ?> 20) echo "\n\n"; /** * Displays indexes */ ?>
to get valid // statistics whatever is the table type if ($cfg['ShowStats']) { $nonisam = FALSE; $is_innodb = (isset($showtable['Type']) && $showtable['Type'] == 'InnoDB'); if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) { $nonisam = TRUE; } if (PMA_MYSQL_INT_VERSION >= 32303 && ($nonisam == FALSE || $is_innodb)) { // Gets some sizes $mergetable = FALSE; if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { $mergetable = TRUE; } list($data_size, $data_unit) = PMA_formatByteDown($showtable['Data_length']); if ($mergetable == FALSE) { list($index_size, $index_unit) = PMA_formatByteDown($showtable['Index_length']); } if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { list($free_size, $free_unit) = PMA_formatByteDown($showtable['Data_free']); list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']); } else { list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length']); } list($tot_size, $tot_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length']); if ($table_info_num_rows > 0) { list($avg_size, $avg_unit) = PMA_formatByteDown(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); } // Displays them ?>
 
[]
  = 40100) { $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']); ?> 0) { $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']); echo "\n"; ?> 0 && $mergetable == FALSE) { $bgcolor = ((++$i%2) ? $cfg['BgcolorTwo'] : $cfg['BgcolorOne']); echo "\n"; ?>
' . $tbl_charset . ''; ?>
 ø
 ø
 Autoindex