You are here

function _db_maintenance_determine_software in DB Maintenance 6.2

Same name and namespace in other branches
  1. 6 db_maintenance.module \_db_maintenance_determine_software()

Determine which database software is in use

2 calls to _db_maintenance_determine_software()
db_maintenance_optimize_tables in ./db_maintenance.module
Perform the maintenance.
_db_maintenance_list_tables in ./db_maintenance.module
Get a list of all the tables in a database.

File

./db_maintenance.module, line 359
Optimizes database tables during cron runs.

Code

function _db_maintenance_determine_software() {
  global $db_url;
  static $db_type;
  if (!empty($db_type)) {
    return $db_type;
  }
  elseif (strpos($db_url, 'mysql://') === 0 || strpos($db_url, 'mysqli://') === 0) {
    $db_type = 'mysql';
    return $db_type;
  }
  elseif (strpos($db_url, 'pgsql://') === 0) {
    $db_type = 'pgsql';
    return $db_type;
  }
  else {
    return FALSE;
  }
}