diff options
author | admin <devnull@localhost> | 2006-09-24 19:58:27 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-24 19:58:27 +0200 |
commit | 5808346898ec9c602893fc54540958a8c556be29 (patch) | |
tree | 2262ca12979e40dcd5cec8be5314b391571feb1d /user_guide/libraries | |
parent | 9659273ba7de6b73c3f188a174e526e692071f43 (diff) |
Diffstat (limited to 'user_guide/libraries')
-rw-r--r-- | user_guide/libraries/database/helpers.html | 15 | ||||
-rw-r--r-- | user_guide/libraries/database/results.html | 27 |
2 files changed, 25 insertions, 17 deletions
diff --git a/user_guide/libraries/database/helpers.html b/user_guide/libraries/database/helpers.html index dd05aef4c..0d299c023 100644 --- a/user_guide/libraries/database/helpers.html +++ b/user_guide/libraries/database/helpers.html @@ -67,21 +67,6 @@ Query Helpers <h1>Query Helper Functions</h1>
-<h2>$query->num_rows()</h2>
-<p>The number of rows returned by the query. Note: In this example, <dfn>$query</dfn> is the variable that the query result object is assigned to:</p>
-
-<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
-echo $query->num_rows();
-</code>
-
-<h2>$query->num_fields()</h2>
-<p>The number of FIELDS returned by the query. Make sure to call the function using your query result object:</p>
-
-<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
-echo $query->num_fields();
-</code>
-
-
<h2>$this->db->insert_id()</h2>
<p>The insert ID number when performing database inserts.</p>
diff --git a/user_guide/libraries/database/results.html b/user_guide/libraries/database/results.html index 342e7e4b4..b1952db5a 100644 --- a/user_guide/libraries/database/results.html +++ b/user_guide/libraries/database/results.html @@ -100,7 +100,7 @@ Query Results }<br />
}
</code>
-
+
<h2>result_array()</h2>
<p>This function returns the query result as a pure array, or FALSE on failure. Typically you'll use this in a foreach loop, like this:</p>
@@ -114,6 +114,10 @@ Query Results echo $row['body'];<br />
}</code>
+ <h2>result('array')</h2>
+
+ <p>Identical to <dfn>$this->db->result_array()</dfn>.</p>
+
<h2>row()</h2>
@@ -180,6 +184,25 @@ Query Results +<h1><br />Result Helper Functions</h1>
+
+
+<h2>$query->num_rows()</h2>
+<p>The number of rows returned by the query. Note: In this example, <dfn>$query</dfn> is the variable that the query result object is assigned to:</p>
+
+<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
+echo $query->num_rows();
+</code>
+
+<h2>$query->num_fields()</h2>
+<p>The number of FIELDS (columns) returned by the query. Make sure to call the function using your query result object:</p>
+
+<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
+echo $query->num_fields();
+</code>
+
+
+
</div>
@@ -192,7 +215,7 @@ Previous Topic: <a href="queries.html">Queries</a> ·
<a href="#top">Top of Page</a> ·
<a href="../../index.html">User Guide Home</a> ·
-Next Topic: <a href="active_record.html">Active Record Pattern</a>
+Next Topic: <a href="helpers.html">Query Helper Functions</a>
<p>
<p><a href="http://www.codeigniter.com">Code Igniter</a> · Copyright © 2006 · <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
</div>
|