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);
CommentFileSizeAuthor
system_info.module9.92 KBcquest

Comments

rstamm’s picture

Status: Active » Fixed

The result of the database query "SHOW STATUS", "SHOW TABLE STATUS" and "SHOW VARIABLES" is shown on an additional page in version 2.

Anonymous’s picture

Status: Fixed » Closed (fixed)