I'd like to share a little code with anyone interested in showing the size of their MySQL database on the admin page Tools->Server Information.

This will show the size used in MB, to the right of the Database version.

Just two small edits are required to /admin/server_info.php

1. About line 14 paste the following
Code:
//BillyWizz 2007-07-17 Get Database Size - START
 $dbsize_details = $db->Execute("SHOW TABLE STATUS");
    $dbsize = 0;
    while (!$dbsize_details->EOF) {  
        $dbsize += $dbsize_details->fields['Data_length'] + $dbsize_details->fields['Index_length'];
    $dbsize_details->MoveNext();
    }
 if ($dbsize != 0) {$dbsize = number_format($dbsize/1000000,1);}
//BillyWizz 2007-07-17 Get Database Size - END
2. Then find the following (at about line 110)
Code:
      <?php echo $system['db_version']; ?>
.. and replace it with
Code:
      <?php echo $system['db_version'] . ' (' . $dbsize . 'MB)'; //BillyWizz 2007-07-17 Get Database Size - REPLACED ?>
Hope this is useful in avoiding the wrath of your host.

Tested ok on Zen Cart version 1.3.7
Script server_info.php 4279 2006-08-26 03:31:29Z drbyte $

BW