function db_status_report

6.x database.pgsql.inc db_status_report()
6.x database.mysqli.inc db_status_report($phase)
6.x database.mysql.inc db_status_report($phase)

Report database status.

Related topics

1 call to db_status_report()
system_requirements in drupal-6.x/modules/system/system.install
Implementation of hook_requirements().
1 string reference to 'db_status_report'
system_requirements in drupal-6.x/modules/system/system.install
Implementation of hook_requirements().

File

drupal-6.x/includes/database.mysqli.inc, line 22
Database interface code for MySQL database servers using the mysqli client libraries. mysqli is included in PHP 5 by default and allows developers to use the advanced features of MySQL 4.1.x, 5.0.x and beyond.

Code

function db_status_report($phase) {
  $t = get_t();

  $version = db_version();

  $form['mysql'] = array(
    'title' => $t('MySQL database'),
    'value' => ($phase == 'runtime') ? l($version, 'admin/reports/status/sql') : $version,
  );

  if (version_compare($version, DRUPAL_MINIMUM_MYSQL) < 0) {
    $form['mysql']['severity'] = REQUIREMENT_ERROR;
    $form['mysql']['description'] = $t('Your MySQL Server is too old. Drupal requires at least MySQL %version.', array('%version' => DRUPAL_MINIMUM_MYSQL));
  }

  return $form;
}