summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/database/drivers/pdo/pdo_driver.php2
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);
}
// --------------------------------------------------------------------