mickeymouse

Well-Known Member
Sep 16, 2003
389
0
166
Dear anish sidhan,

You can write a query by adding-up table and index sizes to calculate the size of the database, the query is:
$statustable = mysql_query(\"show table status\") or die(\"Invalid query: \" . mysql_error());
$status_row = mysql_fetch_array($statustable);
$tablesize = $status_row[\"Data_length\"];
$indexsize = $status_row[\"Index_length\"];
$db_size = $tablesize + $indexsize;

Regards,