wrong percentage
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-07-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* server_status.php3: the percentages of Query types did not add up
|
||||
to 100, because the number of connections is included in the total
|
||||
number of queries, thanks to jht001 ( Jams H Thompson )
|
||||
|
||||
2003-07-17 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* tbl_change.php3, libraries/common.lib.php3: Fixed a MySQL 4.1 bug that
|
||||
appeared when inserting values into ENUM or SET fields.
|
||||
|
@@ -180,12 +180,16 @@ unset($tmp_array);
|
||||
$useBgcolorOne = TRUE;
|
||||
$countRows = 0;
|
||||
while (list($name, $value) = each($queryStats)) {
|
||||
|
||||
// For the percentage column, use Questions - Connections, because
|
||||
// the number of connections is not an item of the Query types
|
||||
// but is included in Questions. Then the total of the percentages is 100.
|
||||
?>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo htmlspecialchars($name); ?> </td>
|
||||
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo number_format($value, 0, $number_decimal_separator, $number_thousands_separator); ?> </td>
|
||||
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo number_format(($value * 3600 / $serverStatus['Uptime']), 2, $number_decimal_separator, $number_thousands_separator); ?> </td>
|
||||
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo number_format(($value * 100 / $serverStatus['Questions']), 2, $number_decimal_separator, $number_thousands_separator); ?> % </td>
|
||||
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo number_format(($value * 100 / ($serverStatus['Questions'] - $serverStatus['Connections'])), 2, $number_decimal_separator, $number_thousands_separator); ?> % </td>
|
||||
</tr>
|
||||
<?php
|
||||
$useBgcolorOne = !$useBgcolorOne;
|
||||
|
Reference in New Issue
Block a user