You are here

function db_status_report in Drupal 6

Same name in this branch
  1. 6 includes/database.mysqli.inc \db_status_report()
  2. 6 includes/database.mysql.inc \db_status_report()
  3. 6 includes/database.pgsql.inc \db_status_report()
Same name and namespace in other branches
  1. 5 includes/database.mysqli.inc \db_status_report()
  2. 5 includes/database.mysql.inc \db_status_report()
  3. 5 includes/database.pgsql.inc \db_status_report()

Report database status.

Related topics

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

File

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;
}