diff options
author | Timothy Warren <tim@timshomepage.net> | 2011-08-24 14:29:05 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2011-08-24 14:29:05 +0200 |
commit | 36fb8de7bf385036f3145dd1fbd9537f6a01ac36 (patch) | |
tree | 6ead80b2bb8c5ab86a084bf88760d57a130243db /system/database | |
parent | 0261596e96446ee5435407abb478204b0c4f79cf (diff) |
Updated version function to use PDO constant
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_driver.php | 2 | ||||
-rw-r--r-- | system/database/drivers/pdo/pdo_driver.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index f3e824daa..f9bf118fb 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -218,7 +218,7 @@ class CI_DB_driver { // Some DBs have functions that return the version, and don't run special // SQL queries per se. In these instances, just return the result. - $driver_version_exceptions = array('oci8', 'sqlite', 'cubrid'); + $driver_version_exceptions = array('oci8', 'sqlite', 'cubrid', 'pdo'); if (in_array($this->dbdriver, $driver_version_exceptions)) { diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index d1bec4489..b0a16d994 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -147,7 +147,7 @@ class CI_DB_pdo_driver extends CI_DB { */ function _version() { - return "SELECT version() AS ver"; + return $this->conn_id->getAttribute(PDO::ATTR_CLIENT_VERSION); } // -------------------------------------------------------------------- |