From d8f002c6c92ed8395331b69ea77c4e5a83bfd83c Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Fri, 26 Aug 2011 14:34:38 +0200 Subject: Removed some documentation for PHP 4 users in the active record documentation. --- user_guide/database/active_record.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'user_guide/database') diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 92d9614d5..0f09e78c3 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -79,9 +79,6 @@ is generated by each database adapter. It also allows for safer queries, since

The following functions allow you to build SQL SELECT statements.

-

Note: If you are using PHP 5 you can use method chaining for more compact syntax. This is described at the end of the page.

- -

$this->db->get();

Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table:

@@ -532,7 +529,7 @@ $this->db->insert('mytable', $object);

Generates an insert string based on the data you supply, and runs the query. You can either pass an array or an object to the function. Here is an example using an array:

- + $data = array(
   array(
      'title' => 'My title' ,
@@ -544,7 +541,7 @@ $data = array(
      'name' => 'Another Name' ,
      'date' => 'Another date'
   )
-);
+);

$this->db->update_batch('mytable', $data);

-- cgit v1.2.3-24-g4f1b From 40d1a7684444f6a8eb4cda23d8822f0b258f0c3e Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sun, 4 Sep 2011 13:57:52 +0100 Subject: Fixed incorrectly named variables in the documentation. --- user_guide/database/results.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide/database') diff --git a/user_guide/database/results.html b/user_guide/database/results.html index ec5f97762..a47e335cb 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -105,8 +105,8 @@ Query Results
foreach ($query->result('User') as $user)
{
-    echo $row->name; // call attributes
-    echo $row->reverse_name(); // or methods defined on the 'User' class
+    echo $user->name; // call attributes
+    echo $user->reverse_name(); // or methods defined on the 'User' class
}
-- cgit v1.2.3-24-g4f1b