You are here

function dba_mysql_statpack_format in Database Administration 7

2 calls to dba_mysql_statpack_format()
dba_mysql_statpack_activity in database/mysql.statpack.inc
dba_mysql_statpack_output in database/mysql.statpack.inc

File

database/mysql.statpack.inc, line 219

Code

function dba_mysql_statpack_format($title, $col1, $col2, $col3, $bytes = FALSE) {
  if ($col1) {
    $col1 = dba_statpack_short($col1, $bytes);
  }
  if ($col2) {
    $col2 = dba_statpack_short($col2, $bytes);
  }
  if ($col3) {
    $col3 = dba_statpack_short($col3, $bytes);
  }
  if (variable_get('dba_statpack_hide', TRUE) && !$col3) {
    return '';
  }
  else {
    return dba_statpack_columns(array(
      $title,
      $col1,
      $col2,
      $col3,
    ));
  }
}