diff options
author | Andrey Andreev <narf@devilix.net> | 2015-03-16 16:00:33 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-03-16 16:00:33 +0100 |
commit | 00e34370e1f235b09e49adfa28f21c8fa3a41778 (patch) | |
tree | 4680af17b7c7dfaa68bbf61586e3ee5a1dd7a454 /user_guide_src/source/database | |
parent | 7f310d63d61e9b334385ef5f6501129d685924ba (diff) | |
parent | 2f164058e3ffa429747e27b284f67f2e71809f52 (diff) |
Merge pull request #3669 from yaoshanliang/develop
count_all_results() with $this->reset_select()
Diffstat (limited to 'user_guide_src/source/database')
-rw-r--r-- | user_guide_src/source/database/query_builder.rst | 6 |
1 files changed, 6 insertions, 0 deletions
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. |