@@ -27,25 +27,25 @@ |
||
| 27 | 27 | row_array(array("Name", "Engine", "Version", "Row Format", "Rows", "Avg Row Length (KB)", "Data Length (MB)", "Max Data Length (MB)", "Index Length (MB)", "Data free (MB)", "Create Time", "Update Time", "Check Time", "Create Options", "Comment")); |
| 28 | 28 | db_init(); |
| 29 | 29 | $result = _mysql_query("show table status"); |
| 30 | - while($row = _mysql_fetch_array($result)) { |
|
| 30 | + while ($row = _mysql_fetch_array($result)) { |
|
| 31 | 31 | $size += ($row["Data_length"] + $row["Index_length"]); |
| 32 | 32 | $engine = $row["Engine"]; |
| 33 | 33 | //if (!$engine) $engine = $row["Type"]; |
| 34 | 34 | row_array(array( |
| 35 | 35 | $row["Name"], |
| 36 | 36 | $engine, |
| 37 | - $row["Version"] , |
|
| 38 | - $row["Row_format"] , |
|
| 39 | - $row["Rows"] , |
|
| 40 | - round($row["Avg_row_length"]/1024,2) , |
|
| 41 | - round($row["Data_length"]/(1024*1024),2) , |
|
| 42 | - round($row["Max_data_length"]/(1024*1024),2) , |
|
| 43 | - round($row["Index_length"]/(1024*1024),2) , |
|
| 44 | - round($row["Data_free"]/(1024*1024),2) , |
|
| 45 | - $row["Create_time"] , |
|
| 46 | - $row["Update_time"] , |
|
| 47 | - $row["Check_time"] , |
|
| 48 | - $row["Create_options"] , |
|
| 37 | + $row["Version"], |
|
| 38 | + $row["Row_format"], |
|
| 39 | + $row["Rows"], |
|
| 40 | + round($row["Avg_row_length"]/1024, 2), |
|
| 41 | + round($row["Data_length"]/(1024*1024), 2), |
|
| 42 | + round($row["Max_data_length"]/(1024*1024), 2), |
|
| 43 | + round($row["Index_length"]/(1024*1024), 2), |
|
| 44 | + round($row["Data_free"]/(1024*1024), 2), |
|
| 45 | + $row["Create_time"], |
|
| 46 | + $row["Update_time"], |
|
| 47 | + $row["Check_time"], |
|
| 48 | + $row["Create_options"], |
|
| 49 | 49 | $row["Comment"] |
| 50 | 50 | )); |
| 51 | 51 | } |