summaryrefslogtreecommitdiffstats
path: root/system/database/DB_query_builder.php
diff options
context:
space:
mode:
authoryaoshanliang <1329517386@qq.com>2015-03-14 06:09:16 +0100
committeryaoshanliang <1329517386@qq.com>2015-03-14 06:09:16 +0100
commit9971e7bc326df1a14e7bb17b1290e5fe5bfd5c60 (patch)
tree4dbc69e3a3cae7c7d6810ee8a472c70b691dd29c /system/database/DB_query_builder.php
parent5f8c0c1f638c40f56251b1f805336dbd5f80e19f (diff)
add a judgment of whether reset select
Diffstat (limited to 'system/database/DB_query_builder.php')
-rw-r--r--system/database/DB_query_builder.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 894d7ddb5..3d4a8576c 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -1366,10 +1366,11 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$result = ($this->qb_distinct === TRUE)
? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results")
: $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows')));
- if($reset)
- {
- $this->_reset_select();
- }
+
+ if($reset)
+ {
+ $this->_reset_select();
+ }
if ($result->num_rows() === 0)
{