From 37f4b9caa02783e06dd7c5318200113409a0deb1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 1 Jul 2011 17:56:50 -0500 Subject: backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance --- user_guide/database/results.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'user_guide/database/results.html') diff --git a/user_guide/database/results.html b/user_guide/database/results.html index 0b82752a7..8ad6a1986 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -112,7 +112,7 @@ Query Results

result_array()

-

This function returns the query result as a pure array, or an empty array when no result is produced. Typically you'll use this in a foreach loop, like this:

+

This function returns the query result as a pure array, or an empty array when no result is produced. Typically you'll use this in a foreach loop, like this:

$query = $this->db->query("YOUR QUERY");

@@ -126,8 +126,8 @@ Query Results

row()

-

This function returns a single result row. If your query has more than one row, it returns only the first row. - The result is returned as an object. Here's a usage example:

+

This function returns a single result row. If your query has more than one row, it returns only the first row. + The result is returned as an object. Here's a usage example:

$query = $this->db->query("YOUR QUERY");

@@ -157,7 +157,7 @@ Query Results

row_array()

-

Identical to the above row() function, except it returns an array. Example:

+

Identical to the above row() function, except it returns an array. Example:

$query = $this->db->query("YOUR QUERY");
@@ -209,7 +209,7 @@ echo $query->num_rows();

$query->num_fields()

-

The number of FIELDS (columns) returned by the query. Make sure to call the function using your query result object:

+

The number of FIELDS (columns) returned by the query. Make sure to call the function using your query result object:

$query = $this->db->query('SELECT * FROM my_table');

echo $query->num_fields(); @@ -218,9 +218,9 @@ echo $query->num_fields();

$query->free_result()

-

It frees the memory associated with the result and deletes the result resource ID. Normally PHP frees its memory automatically at the end of script -execution. However, if you are running a lot of queries in a particular script you might want to free the result after each query result has been -generated in order to cut down on memory consumptions. Example: +

It frees the memory associated with the result and deletes the result resource ID. Normally PHP frees its memory automatically at the end of script +execution. However, if you are running a lot of queries in a particular script you might want to free the result after each query result has been +generated in order to cut down on memory consumptions. Example:

$query = $this->db->query('SELECT title FROM my_table');

@@ -228,12 +228,12 @@ foreach ($query->result() as $row)
{
   echo $row->title;
}
-$query->free_result(); // The $query result object will no longer be available
+$query->free_result(); // The $query result object will no longer be available

$query2 = $this->db->query('SELECT name FROM some_table');

$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
-- cgit v1.2.3-24-g4f1b From 9c63d0bb34be4007178d5a7e46348d5e23fee3ff Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 01:55:44 +0100 Subject: Bumped CodeIgniter version to 2.1.0. --- user_guide/database/results.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/database/results.html') diff --git a/user_guide/database/results.html b/user_guide/database/results.html index ec5f97762..a6b85d8c4 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

-- cgit v1.2.3-24-g4f1b From 04b0cf073484d80fb65c4bc072db9a91fef7040f Mon Sep 17 00:00:00 2001 From: Yoko TAMADA Date: Tue, 1 Nov 2011 23:01:29 +0900 Subject: fix user_guide/database/results.html, unmodified variable '$user' to '$row' --- user_guide/database/results.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/database/results.html') diff --git a/user_guide/database/results.html b/user_guide/database/results.html index a6b85d8c4..0baf992fb 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -103,7 +103,7 @@ Query Results $query = $this->db->query("SELECT * FROM users;");

- foreach ($query->result('User') as $user)
+ foreach ($query->result('User') as $row)
{
   echo $row->name; // call attributes
   echo $row->reverse_name(); // or methods defined on the 'User' class
-- cgit v1.2.3-24-g4f1b