From 9971e7bc326df1a14e7bb17b1290e5fe5bfd5c60 Mon Sep 17 00:00:00 2001 From: yaoshanliang <1329517386@qq.com> Date: Sat, 14 Mar 2015 13:09:16 +0800 Subject: add a judgment of whether reset select --- system/database/DB_query_builder.php | 9 +++++---- 1 file 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) { -- cgit v1.2.3-24-g4f1b