📄 tbl_structure.php
字号:
/** * Displays indexes */PMA_generate_slider_effect('tablestatistics_indexes', $strDetails);if (! $tbl_is_view && ! $db_is_information_schema && 'ARCHIVE' != $tbl_type) { /** * Display indexes */ echo PMA_Index::getView($table, $db); ?><br /><form action="./tbl_indexes.php" method="post" onsubmit="return checkFormElementInRange(this, 'idx_num_fields', '<?php echo str_replace('\'', '\\\'', $GLOBALS['strInvalidColumnCount']); ?>', 1)"><fieldset> <?php echo PMA_generate_common_hidden_inputs($db, $table); echo sprintf($strCreateIndex, '<input type="text" size="2" name="added_fields" value="1" />'); ?> <input type="submit" name="create_index" value="<?php echo $strGo; ?>" onclick="return checkFormElementInRange(this.form, 'idx_num_fields', '<?php echo str_replace('\'', '\\\'', $GLOBALS['strInvalidColumnCount']); ?>', 1)" /></fieldset></form><br /> <?php}echo '<div id="tablestatistics">' . "\n";/** * Displays Space usage and row statistics */// BEGIN - Calc Table Space - staybyte - 9 June 2001// loic1, 22 feb. 2002: updated with patch from// Joshua Nye <josh at boxcarmedia.com> to get valid// statistics whatever is the table typeif ($cfg['ShowStats']) { $nonisam = false; $is_innodb = (isset($showtable['Type']) && $showtable['Type'] == 'InnoDB'); if (isset($showtable['Type']) && !preg_match('@ISAM|HEAP@i', $showtable['Type'])) { $nonisam = true; } // Gets some sizes $mergetable = false; if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { $mergetable = true; } // this is to display for example 261.2 MiB instead of 268k KiB $max_digits = 5; $decimals = 1; list($data_size, $data_unit) = PMA_formatByteDown($showtable['Data_length'], $max_digits, $decimals); if ($mergetable == false) { list($index_size, $index_unit) = PMA_formatByteDown($showtable['Index_length'], $max_digits, $decimals); } if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { list($free_size, $free_unit) = PMA_formatByteDown($showtable['Data_free'], $max_digits, $decimals); list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free'], $max_digits, $decimals); } else { list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'], $max_digits, $decimals); } list($tot_size, $tot_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'], $max_digits, $decimals); 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 $odd_row = false; ?> <a name="showusage"></a> <?php if (! $tbl_is_view && ! $db_is_information_schema) { ?> <table id="tablespaceusage" class="data"> <caption class="tblHeaders"><?php echo $strSpaceUsage; ?></caption> <thead> <tr> <th><?php echo $strType; ?></th> <th colspan="2"><?php echo $strUsage; ?></th> </tr> </thead> <tbody> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strData; ?></th> <td class="value"><?php echo $data_size; ?></td> <td class="unit"><?php echo $data_unit; ?></td> </tr> <?php if (isset($index_size)) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strIndex; ?></th> <td class="value"><?php echo $index_size; ?></td> <td class="unit"><?php echo $index_unit; ?></td> </tr> <?php } if (isset($free_size)) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?> warning"> <th class="name"><?php echo $strOverhead; ?></th> <td class="value"><?php echo $free_size; ?></td> <td class="unit"><?php echo $free_unit; ?></td> </tr> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strEffective; ?></th> <td class="value"><?php echo $effect_size; ?></td> <td class="unit"><?php echo $effect_unit; ?></td> </tr> <?php } if (isset($tot_size) && $mergetable == false) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strTotalUC; ?></th> <td class="value"><?php echo $tot_size; ?></td> <td class="unit"><?php echo $tot_unit; ?></td> </tr> <?php } // Optimize link if overhead if (isset($free_size) && ($tbl_type == 'MYISAM' || $tbl_type == 'MARIA' || $tbl_type == 'BDB')) { ?> <tr class="tblFooters"> <td colspan="3" align="center"> <a href="sql.php?<?php echo $url_query; ?>&pos=0&sql_query=<?php echo urlencode('OPTIMIZE TABLE ' . PMA_backquote($table)); ?>"><?php if ($cfg['PropertiesIconic']) { echo '<img class="icon" src="' . $pmaThemeImage . 'b_tbloptimize.png" width="16" height="16" alt="' . $strOptimizeTable. '" />'; } echo $strOptimizeTable; ?></a> </td> </tr> <?php } ?> </tbody> </table> <?php } $odd_row = false; ?> <table id="tablerowstats" class="data"> <caption class="tblHeaders"><?php echo $strRowsStatistic; ?></caption> <thead> <tr> <th><?php echo $strStatement; ?></th> <th><?php echo $strValue; ?></th> </tr> </thead> <tbody> <?php if (isset($showtable['Row_format'])) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strFormat; ?></th> <td class="value"><?php if ($showtable['Row_format'] == 'Fixed') { echo $strFixed; } elseif ($showtable['Row_format'] == 'Dynamic') { echo $strDynamic; } else { echo $showtable['Row_format']; } ?></td> </tr> <?php } if (! empty($showtable['Create_options'])) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strOptions; ?></th> <td class="value"><?php if ($showtable['Create_options'] == 'partitioned') { echo $strPartitioned; } else { echo $showtable['Create_options']; } ?></td> </tr> <?php } if (!empty($tbl_collation)) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strCollation; ?></th> <td class="value"><?php echo '<dfn title="' . PMA_getCollationDescr($tbl_collation) . '">' . $tbl_collation . '</dfn>'; ?></td> </tr> <?php } if (!$is_innodb && isset($showtable['Rows'])) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strRows; ?></th> <td class="value"><?php echo PMA_formatNumber($showtable['Rows'], 0); ?></td> </tr> <?php } if (!$is_innodb && isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strRowLength; ?> ø</th> <td class="value"><?php echo PMA_formatNumber($showtable['Avg_row_length'], 0); ?></td> </tr> <?php } if (!$is_innodb && isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == false) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strRowSize; ?> ø</th> <td class="value"><?php echo $avg_size . ' ' . $avg_unit; ?></td> </tr> <?php } if (isset($showtable['Auto_increment'])) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strNext; ?> Autoindex</th> <td class="value"><?php echo PMA_formatNumber($showtable['Auto_increment'], 0); ?></td> </tr> <?php } if (isset($showtable['Create_time'])) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strStatCreateTime; ?></th> <td class="value"><?php echo PMA_localisedDate(strtotime($showtable['Create_time'])); ?></td> </tr> <?php } if (isset($showtable['Update_time'])) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strStatUpdateTime; ?></th> <td class="value"><?php echo PMA_localisedDate(strtotime($showtable['Update_time'])); ?></td> </tr> <?php } if (isset($showtable['Check_time'])) { ?> <tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?>"> <th class="name"><?php echo $strStatCheckTime; ?></th> <td class="value"><?php echo PMA_localisedDate(strtotime($showtable['Check_time'])); ?></td> </tr> <?php } ?> </tbody> </table> <?php}// END - Calc Table Spacerequire './libraries/tbl_triggers.lib.php';echo '<div class="clearfloat"></div>' . "\n";echo '</div>' . "\n";echo '</div>' . "\n";/** * Displays the footer */require_once './libraries/footer.inc.php';?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -