fix division by zero error

This commit is contained in:
Steve Alberty
2001-07-11 10:51:06 +00:00
parent 3d9b67f18b
commit 4a34c45612
2 changed files with 4 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2001-07-11 Steve Alberty <alberty@neptunlabs.de>
* tbl_properties.php3: fix division by zero error
2001-07-09 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* header.inc.php3: cosmetic changes.
* tbl_properties.php3, db_details.php3, functions.js: export the js work

View File

@@ -257,7 +257,7 @@ if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_typ
}
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows']);
if (isset($showtable['Rows']) && $showtable['Rows']>0) list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
// Displays them
if ($index_count > 0) {