Closed (fixed)
Project:
System Information
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2007 at 16:16 UTC
Updated:
1 May 2007 at 10:30 UTC
I wanted to have some mode stats about the MySQL database in the systeminfo, so I added these lines in systeminfo.module database/mysql part in system_info_display_information function (see attached file)
$result = db_query("SHOW TABLE STATUS");
$total = 0; $nbtables = 0;
while($row = mysql_fetch_array($result))// Here we are to add the columns 'Index_length' and 'Data_length' of each row
{
$nbtables++;
$total = $total + $row['Data_length']+$row['Index_length'];
}
$rows[] = array(t('Database size'), $total);
$rows[] = array(t('Number of tables'), $nbtables);
| Comment | File | Size | Author |
|---|---|---|---|
| system_info.module | 9.92 KB | cquest |
Comments
Comment #1
rstamm commentedThe result of the database query "SHOW STATUS", "SHOW TABLE STATUS" and "SHOW VARIABLES" is shown on an additional page in version 2.
Comment #2
(not verified) commented