summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/database/query_builder.rst6
2 files changed, 7 insertions, 0 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 99e4de53a..7f6cafa95 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -192,6 +192,7 @@ Release Date: Not Released
- Methods ``insert_batch()`` and ``update_batch()`` now return an integer representing the number of rows affected by them.
- Methods ``where()``, ``or_where()``, ``having()`` and ``or_having()`` now convert trailing ``=`` and ``<>``, ``!=`` SQL operators to ``IS NULL`` and ``IS NOT NULL`` respectively when the supplied comparison value is ``NULL``.
- Added method chaining support to ``reset_query()``, ``start_cache()``, ``stop_cache()`` and ``flush_cache()``.
+ - Added an optional second to ``count_all_results()`` to disable resetting of QB values.
- :doc:`Database Results <database/results>` changes include:
diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst
index 9b4694710..68ddca717 100644
--- a/user_guide_src/source/database/query_builder.rst
+++ b/user_guide_src/source/database/query_builder.rst
@@ -527,6 +527,12 @@ where(), or_where(), like(), or_like(), etc. Example::
$this->db->from('my_table');
echo $this->db->count_all_results(); // Produces an integer, like 17
+The second paramater is to disable resetting of QB values. Example::
+
+ echo $this->db->count_all_results('my_table'); // Produces an integer, like 25
+ $this->db->like('title', 'match');
+ echo $this->db->count_all_results(); // Produces an integer, like 17
+
**$this->db->count_all()**
Permits you to determine the number of rows in a particular table.