summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql/mssql_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/mssql/mssql_driver.php
parent6d9915a7a82ff3f7e9dc0f4969764788cf005f36 (diff)
Fix issue #1875
Diffstat (limited to 'system/database/drivers/mssql/mssql_driver.php')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index a62ea94b3..a5ace02e6 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -465,7 +465,7 @@ class CI_DB_mssql_driver extends CI_DB {
$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)