1 2 3 4 5 6 7 8 9 10
|
<?php
$db_size = 0;
// SQL-Abfrage
$result = mysql_query("SHOW TABLE STATUS FROM datenbank");
while($row = mysql_fetch_array($result))
$db_size += $row["Data_length"] + $row["Index_length"];
mysql_free_result($result);
// Ausgabe in Kilobyte
echo "Datenbankgröße: ".number_format($db_size / 1024, 0, ",", ".")." KB\n";
?>
|