summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-05 15:32:17 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-05 15:32:17 +0100
commitfdb75418c9c4b87e9d7f15f1b59fe8d55739c8f3 (patch)
tree33dfcec8c2c6eab25afcf90fc3c33680c9b5d1ea
parent57bdeb61bf199d1ae3ceaede4e9a9af8290ce715 (diff)
Add a note to the num_rows() documentation
-rw-r--r--user_guide_src/source/database/results.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/user_guide_src/source/database/results.rst b/user_guide_src/source/database/results.rst
index 4f93c794d..90d2efce3 100644
--- a/user_guide_src/source/database/results.rst
+++ b/user_guide_src/source/database/results.rst
@@ -150,6 +150,12 @@ is the variable that the query result object is assigned to::
echo $query->num_rows();
+..note::
+ Not all database drivers have a native way of getting the total
+ number of rows for a result set. When this is the case, all of
+ the data is prefetched and count() is manually called on the
+ resulting array in order to achieve the same functionality.
+
$query->num_fields()
=====================
@@ -182,5 +188,4 @@ Example::
$row = $query2->row();
echo $row->name;
- $query2->free_result();// The $query2 result object will no longer be available
-
+ $query2->free_result(); // The $query2 result object will no longer be available