diff options
author | Timothy Warren <tim@timshomepage.net> | 2011-09-06 20:40:34 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2011-09-06 20:40:34 +0200 |
commit | f22ce8f368e64b1c343e06427e8dad1ab1cef2a4 (patch) | |
tree | f0552e9318a541e82c3375646fc870490d835e12 /user_guide/database | |
parent | 36fb8de7bf385036f3145dd1fbd9537f6a01ac36 (diff) | |
parent | 40d1a7684444f6a8eb4cda23d8822f0b258f0c3e (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'user_guide/database')
-rw-r--r-- | user_guide/database/active_record.html | 7 | ||||
-rw-r--r-- | user_guide/database/results.html | 4 |
2 files changed, 4 insertions, 7 deletions
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 <p>The following functions allow you to build SQL <strong>SELECT</strong> statements.</p> -<p><strong>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.</strong></p> - - <h2>$this->db->get();</h2> <p>Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table:</p> @@ -532,7 +529,7 @@ $this->db->insert('mytable', $object); <p>Generates an insert string based on the data you supply, and runs the query. You can either pass an <strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p> -<code> +<code> $data = array(<br/> array(<br /> 'title' => 'My title' ,<br /> @@ -544,7 +541,7 @@ $data = array(<br/> 'name' => 'Another Name' ,<br /> 'date' => 'Another date'<br /> )<br/> -);<br /> +);<br /> <br /> $this->db->update_batch('mytable', $data); <br /><br /> 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 <br /> foreach ($query->result('User') as $user)<br /> {<br /> - echo $row->name; // call attributes<br /> - echo $row->reverse_name(); // or methods defined on the 'User' class<br /> + echo $user->name; // call attributes<br /> + echo $user->reverse_name(); // or methods defined on the 'User' class<br /> } </code> |