summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-11 09:24:51 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-11 09:24:51 +0200
commit9738668fd6b4078c7eb9df3372e5035791caaaf4 (patch)
treec7be15857c61754f06c0d66e57d88c7c93a9b956 /system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
parent6d9915a7a82ff3f7e9dc0f4969764788cf005f36 (diff)
Fix issue #1875
Diffstat (limited to 'system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
index 2346e683e..7c4b008b2 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
@@ -232,7 +232,7 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver {
$orderby = 'ORDER BY '.implode(', ', $this->qb_orderby);
// We have to strip the ORDER BY clause
- $sql = trim(substr($sql, 0, strrpos($sql, 'ORDER BY '.$orderby)));
+ $sql = trim(substr($sql, 0, strrpos($sql, $orderby)));
return 'SELECT '.(count($this->qb_select) === 0 ? '*' : implode(', ', $this->qb_select))." FROM (\n"
.preg_replace('/^(SELECT( DISTINCT)?)/i', '\\1 ROW_NUMBER() OVER('.$orderby.') AS '.$this->escape_identifiers('CI_rownum').', ', $sql)