summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-08-25 12:24:51 +0200
committerAndrey Andreev <narf@devilix.net>2017-08-25 12:24:51 +0200
commit613b898234debcaea5ec9160e5249358ac7e3dfc (patch)
tree5e24da635e01b35e7bd60f82f2cae5ab9c6dff78 /system/database/drivers/sqlsrv
parent85869da7bf1080f26b13f1f1870e192a75a2f677 (diff)
[ci skip] Fix #5236
Diffstat (limited to 'system/database/drivers/sqlsrv')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index a43e2539a..4edcc7fb8 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -478,7 +478,7 @@ class CI_DB_sqlsrv_driver extends CI_DB {
$sql = trim(substr($sql, 0, strrpos($sql, $orderby)));
// Get the fields to select from our subquery, so that we can avoid CI_rownum appearing in the actual results
- if (count($this->qb_select) === 0)
+ if (count($this->qb_select) === 0 OR strpos(implode(',', $this->qb_select), '*') !== FALSE)
{
$select = '*'; // Inevitable
}