= 32303) {
$local_query = 'SHOW TABLE STATUS LIKE \'' . sql_addslashes($table, TRUE) . '\'';
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url);
$showtable = mysql_fetch_array($result);
$num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
$show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
} else {
$local_query = 'SELECT COUNT(*) AS count FROM ' . backquote($table);
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url);
$showtable = array();
$num_rows = mysql_result($result, 0, 'count');
$show_comment = '';
} // end display comments
mysql_free_result($result);
/**
* Gets table keys and retains them
*/
$local_query = 'SHOW KEYS FROM ' . backquote($table);
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url);
$primary = '';
$prev_key = '';
$prev_seq = 0;
$i = 0;
$pk_array = array(); // will be use to emphasis prim. keys in the table view
while ($row = mysql_fetch_array($result)) {
$ret_keys[] = $row;
// Unset the 'Seq_in_index' value if it's not a composite index - part 1
if ($i > 0 && $row['Key_name'] != $prev_key && $prev_seq == 1) {
unset($ret_keys[$i-1]['Seq_in_index']);
}
$prev_key = $row['Key_name'];
$prev_seq = $row['Seq_in_index'];
// Backups the list of primary keys
if ($row['Key_name'] == 'PRIMARY') {
$primary .= $row['Column_name'] . ', ';
$pk_array[$row['Column_name']] = 1;
}
$i++;
} // end while
// Unset the 'Seq_in_index' value if it's not a composite index - part 2
if ($i > 0 && $row['Key_name'] != $prev_key && $prev_seq == 1) {
unset($ret_keys[$i-1]['Seq_in_index']);
}
mysql_free_result($result);
/**
* Gets fields properties
*/
$local_query = 'SHOW FIELDS FROM ' . backquote($table);
$result = mysql_query($local_query) or mysql_die('', $local_query, '', $err_url);
$fields_cnt = mysql_num_rows($result);
/**
* Displays the comments of the table is MySQL >= 3.23
*/
if (!empty($show_comment)) {
echo $strTableComments . ' : ' . $row['Comment'];
}
/**
* Displays the table structure
*/
?>
|
|
|
|
|
|
NULL';
}
} else {
$row['Default'] = htmlspecialchars($row['Default']);
}
$field_name = htmlspecialchars($row['Field']);
if (isset($pk_array[$row['Field']])) {
$field_name = '' . $field_name . '';
}
echo "\n";
?>
|
> |
|
|
|
|
0) {
?>
|
|
= 32323) {
echo "\n";
?>
|
|
-' . $row['Seq_in_index'] . '-';
} else {
$key_name = htmlspecialchars($row['Key_name']);
}
if (!isset($row['Sub_part'])) {
$row['Sub_part'] = '';
}
if ($row['Key_name'] != $prev_key) {
$j++;
$prev_key = $row['Key_name'];
}
$bgcolor = ($j % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo;
echo "\n";
?>
|
|
= 32323) {
echo "\n";
?>
|
|
|
|
= 32303 && $nonisam == FALSE) {
// Gets some sizes
$mergetable = FALSE;
if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') {
$mergetable = TRUE;
}
list($data_size, $data_unit) = format_byte_down($showtable['Data_length']);
if ($mergetable == FALSE) {
list($index_size, $index_unit) = format_byte_down($showtable['Index_length']);
}
if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) {
list($free_size, $free_unit) = format_byte_down($showtable['Data_free']);
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
} else {
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
}
list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
if ($num_rows > 0) {
list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
}
// Displays them
?>
|
|
|
|
|
|
|
|
0) {
echo "\n";
?>
ø |
|
0 && $mergetable == FALSE) {
echo "\n";
?>
ø |
|
Autoindex |
|
|
= 32303 && $nonisam == FALSE)
} // end if ($cfgShowStats)
/**
* Displays the footer
*/
echo "\n";
require('./footer.inc.php3');
?>