started merging patch #444128 (display & dump index length)
This commit is contained in:
@@ -17,8 +17,12 @@ $Source$
|
|||||||
Pietro Danesi <danone at aruba.it>.
|
Pietro Danesi <danone at aruba.it>.
|
||||||
* tbl_alter.php3, lines 9-11: fixed a js error.
|
* tbl_alter.php3, lines 9-11: fixed a js error.
|
||||||
* header.inc.php3: merged an improved version of the patch #446292 - show
|
* header.inc.php3: merged an improved version of the patch #446292 - show
|
||||||
current db/table info in the title (except for NN4).
|
current db/table info in the title (except for NN4). Thanks to
|
||||||
|
Alexander Kulikov (kaa348 at users.sourceforge.net).
|
||||||
* lang/french.inc.php3: fixed a typo.
|
* lang/french.inc.php3: fixed a typo.
|
||||||
|
* db_details.php3, tbl_properties.php3: started merging patch #444128
|
||||||
|
(display & dump index length) submitted by
|
||||||
|
Marcus B<>rger (helly at users.sourceforge.net).
|
||||||
|
|
||||||
2001-09-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-09-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* lang/czech-iso.inc.php3 & czech-win1250.inc.php3: updated thanks to
|
* lang/czech-iso.inc.php3 & czech-win1250.inc.php3: updated thanks to
|
||||||
|
@@ -117,6 +117,7 @@ else if (MYSQL_INT_VERSION >= 32300 && isset($tbl_cache)) {
|
|||||||
<th> <?php echo ucfirst($strTable); ?> </th>
|
<th> <?php echo ucfirst($strTable); ?> </th>
|
||||||
<th colspan="6"><?php echo ucfirst($strAction); ?></th>
|
<th colspan="6"><?php echo ucfirst($strAction); ?></th>
|
||||||
<th><?php echo ucfirst($strRecords); ?></th>
|
<th><?php echo ucfirst($strRecords); ?></th>
|
||||||
|
<th><?php echo ucfirst($strType); ?></th>
|
||||||
<th><?php echo ucfirst($strSize); ?></th>
|
<th><?php echo ucfirst($strSize); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@@ -215,6 +216,9 @@ else if (MYSQL_INT_VERSION >= 32300 && isset($tbl_cache)) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
<td nowrap="nowrap">
|
||||||
|
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
||||||
|
</td>
|
||||||
<td align="right" nowrap="nowrap">
|
<td align="right" nowrap="nowrap">
|
||||||
|
|
||||||
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
|
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
|
||||||
@@ -247,13 +251,16 @@ else if (MYSQL_INT_VERSION >= 32300 && isset($tbl_cache)) {
|
|||||||
<th align="right" nowrap="nowrap">
|
<th align="right" nowrap="nowrap">
|
||||||
<b><?php echo number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator); ?></b>
|
<b><?php echo number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator); ?></b>
|
||||||
</th>
|
</th>
|
||||||
|
<th align="center">
|
||||||
|
<b>--</b>
|
||||||
|
</td>
|
||||||
<th align="right" nowrap="nowrap">
|
<th align="right" nowrap="nowrap">
|
||||||
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="10">
|
<td colspan="11">
|
||||||
<img src="./images/arrow.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
|
<img src="./images/arrow.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
|
||||||
<i><?php echo $strWithChecked; ?></i>
|
<i><?php echo $strWithChecked; ?></i>
|
||||||
<input type="submit" name="submit_mult" value="<?php echo $strDrop; ?>" />
|
<input type="submit" name="submit_mult" value="<?php echo $strDrop; ?>" />
|
||||||
|
@@ -166,10 +166,12 @@ else {
|
|||||||
$local_query = 'SHOW KEYS FROM ' . backquote($table);
|
$local_query = 'SHOW KEYS FROM ' . backquote($table);
|
||||||
$result = mysql_query($local_query) or mysql_die('', $local_query);
|
$result = mysql_query($local_query) or mysql_die('', $local_query);
|
||||||
$primary = '';
|
$primary = '';
|
||||||
|
$pk_array = array();
|
||||||
while($row = mysql_fetch_array($result)) {
|
while($row = mysql_fetch_array($result)) {
|
||||||
$ret_keys[] = $row;
|
$ret_keys[] = $row;
|
||||||
if ($row['Key_name'] == 'PRIMARY') {
|
if ($row['Key_name'] == 'PRIMARY') {
|
||||||
$primary .= $row['Column_name'] . ', ';
|
$primary .= $row['Column_name'] . ', ';
|
||||||
|
$pk_array[$row['Column_name']] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,6 +267,10 @@ while ($row = mysql_fetch_array($result)) {
|
|||||||
} else {
|
} else {
|
||||||
$row['Default'] = htmlspecialchars($row['Default']);
|
$row['Default'] = htmlspecialchars($row['Default']);
|
||||||
}
|
}
|
||||||
|
$field_name = htmlspecialchars($row['Field']);
|
||||||
|
if (isset($pk_array[$row['Field']])) {
|
||||||
|
$field_name = '<b>' . $field_name . '</b>';
|
||||||
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<tr bgcolor="<?php echo $bgcolor; ?>">
|
<tr bgcolor="<?php echo $bgcolor; ?>">
|
||||||
@@ -279,7 +285,7 @@ while ($row = mysql_fetch_array($result)) {
|
|||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<td nowrap="nowrap"><?php echo htmlspecialchars($row['Field']); ?> </td>
|
<td nowrap="nowrap"><?php echo $field_name; ?> </td>
|
||||||
<td<?php echo $type_nowrap; ?>><?php echo $type; ?></td>
|
<td<?php echo $type_nowrap; ?>><?php echo $type; ?></td>
|
||||||
<td nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
<td nowrap="nowrap"><?php echo $strAttribute; ?></td>
|
||||||
<td><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
<td><?php echo (($row['Null'] == '') ? $strNo : $strYes); ?> </td>
|
||||||
@@ -376,6 +382,14 @@ if ($index_count > 0) {
|
|||||||
<?php
|
<?php
|
||||||
for ($i = 0; $i < $index_count; $i++) {
|
for ($i = 0; $i < $index_count; $i++) {
|
||||||
$row = $ret_keys[$i];
|
$row = $ret_keys[$i];
|
||||||
|
if (isset($row['Seq_in_index'])) {
|
||||||
|
$key_name = htmlspecialchars($row['Key_name']) . ' <small>-' . $row['Seq_in_index'] . '-</small>';
|
||||||
|
} else {
|
||||||
|
$key_name = htmlspecialchars($row['Key_name']);
|
||||||
|
}
|
||||||
|
if (!isset($row['Sub_part'])) {
|
||||||
|
$row['Sub_part'] = '';
|
||||||
|
}
|
||||||
if ($row['Key_name'] == 'PRIMARY') {
|
if ($row['Key_name'] == 'PRIMARY') {
|
||||||
$sql_query = urlencode('ALTER TABLE ' . backquote($table) . ' DROP PRIMARY KEY');
|
$sql_query = urlencode('ALTER TABLE ' . backquote($table) . ' DROP PRIMARY KEY');
|
||||||
$js_msg = 'ALTER TABLE ' . js_format($table) . ' DROP PRIMARY KEY';
|
$js_msg = 'ALTER TABLE ' . js_format($table) . ' DROP PRIMARY KEY';
|
||||||
@@ -388,9 +402,10 @@ if ($index_count > 0) {
|
|||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo htmlspecialchars($row['Key_name']) . "\n"; ?></td>
|
<td><?php echo $key_name; ?></td>
|
||||||
<td><?php echo (($row['Non_unique'] == '0') ? $strYes : $strNo) . "\n"; ?></td>
|
<td><?php echo (($row['Non_unique'] == '0') ? $strYes : $strNo); ?></td>
|
||||||
<td><?php echo htmlspecialchars($row['Column_name']) . "\n"; ?></td>
|
<td><?php echo htmlspecialchars($row['Column_name']); ?></td>
|
||||||
|
<td align="right"> <?php echo $row['Sub_part']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="sql.php3?<?php echo "$url_query&sql_query=$sql_query&zero_rows=$zero_rows\n"; ?>"
|
<a href="sql.php3?<?php echo "$url_query&sql_query=$sql_query&zero_rows=$zero_rows\n"; ?>"
|
||||||
onclick="return confirmLink(this, '<?php echo $js_msg; ?>')">
|
onclick="return confirmLink(this, '<?php echo $js_msg; ?>')">
|
||||||
|
Reference in New Issue
Block a user