diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-04-25 02:38:17 +0200 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-04-25 02:38:17 +0200 |
commit | bf8d68a5652e52c39c59c7e441dcb4fe1ccd15cf (patch) | |
tree | 6843adeaf13e805e81a6251bf8ce82c582593a07 /user_guide/database/active_record.html | |
parent | c83bea665eb3a441b6e52528f75fa4c71ca1f8c2 (diff) |
Duplicate this->db->insert_batch in documentation. Fixes #202
Diffstat (limited to 'user_guide/database/active_record.html')
-rw-r--r-- | user_guide/database/active_record.html | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index faa13b3e7..62833813c 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -539,30 +539,6 @@ $data = array(<br/> )<br/> );<br /> <br /> -$this->db->insert_batch('mytable', $data); -<br /><br /> -// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date'), ('Another title', 'Another name', 'Another date')</code> - -<p>The first parameter will contain the table name, the second is an associative array of values.</p> - -<h2>$this->db->insert_batch();</h2> -<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> -$data = array(<br/> - array(<br /> - 'title' => 'My title' ,<br /> - 'name' => 'My Name' ,<br /> - 'date' => 'My date'<br /> - ),<br /> - array(<br /> - 'title' => 'Another title' ,<br /> - 'name' => 'Another Name' ,<br /> - 'date' => 'Another date'<br /> - )<br/> -);<br /> -<br /> $this->db->update_batch('mytable', $data); <br /><br /> // Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date'), ('Another title', 'Another name', 'Another date')</code> |