db_driver

Definition

db_driver()
drupal/includes/database/database.inc, line 1799

Description

Retrieve the name of the currently active database driver, such as "mysql" or "pgsql".

Return value

The name of the currently active database driver.

Related topics

Namesort iconDescription
Database abstraction layerAllow the use of different database servers using the same code base.

Code

function db_driver() {
  return Database::getActiveConnection()->driver();
}