diff options
Diffstat (limited to 'user_guide/database')
-rw-r--r-- | user_guide/database/active_record.html | 37 | ||||
-rw-r--r-- | user_guide/database/caching.html | 2 | ||||
-rw-r--r-- | user_guide/database/call_function.html | 2 | ||||
-rw-r--r-- | user_guide/database/configuration.html | 2 | ||||
-rw-r--r-- | user_guide/database/connecting.html | 2 | ||||
-rw-r--r-- | user_guide/database/examples.html | 2 | ||||
-rw-r--r-- | user_guide/database/fields.html | 2 | ||||
-rw-r--r-- | user_guide/database/forge.html | 2 | ||||
-rw-r--r-- | user_guide/database/helpers.html | 2 | ||||
-rw-r--r-- | user_guide/database/index.html | 2 | ||||
-rw-r--r-- | user_guide/database/queries.html | 2 | ||||
-rw-r--r-- | user_guide/database/results.html | 2 | ||||
-rw-r--r-- | user_guide/database/table_data.html | 2 | ||||
-rw-r--r-- | user_guide/database/transactions.html | 2 | ||||
-rw-r--r-- | user_guide/database/utilities.html | 2 |
15 files changed, 45 insertions, 20 deletions
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 30c45fdde..dc06c87be 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -27,7 +27,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -489,10 +489,10 @@ echo $this->db->count_all_results();<br /> <code> $data = array(<br /> - 'title' => 'My title' ,<br /> - 'name' => 'My Name' ,<br /> - 'date' => 'My date'<br /> - );<br /> + 'title' => 'My title' ,<br /> + 'name' => 'My Name' ,<br /> + 'date' => 'My date'<br /> +);<br /> <br /> $this->db->insert('mytable', $data); <br /><br /> @@ -517,10 +517,35 @@ $this->db->insert('mytable', $object); <br /><br /> // Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')</code> -<p>The first parameter will contain the table name, the second is an associative array of values.</p> +<p>The first parameter will contain the table name, the second is an object.</p> <p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</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->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> + +<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html index ec2e5c40b..4a18cbd64 100644 --- a/user_guide/database/caching.html +++ b/user_guide/database/caching.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/call_function.html b/user_guide/database/call_function.html index e34369f37..1f6079fb4 100644 --- a/user_guide/database/call_function.html +++ b/user_guide/database/call_function.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html index d71cd34db..60e7065dd 100644 --- a/user_guide/database/configuration.html +++ b/user_guide/database/configuration.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html index 1e971986e..8f923b140 100644 --- a/user_guide/database/connecting.html +++ b/user_guide/database/connecting.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/examples.html b/user_guide/database/examples.html index c0eabd846..10daef7ee 100644 --- a/user_guide/database/examples.html +++ b/user_guide/database/examples.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html index b1dbd0012..8299c507c 100644 --- a/user_guide/database/fields.html +++ b/user_guide/database/fields.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html index d18db5820..c7b141e84 100644 --- a/user_guide/database/forge.html +++ b/user_guide/database/forge.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index f4ad8dfe6..b8a5785fa 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/index.html b/user_guide/database/index.html index cc2d2166b..1dabb56b1 100644 --- a/user_guide/database/index.html +++ b/user_guide/database/index.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html index e3d6ab186..b69f2260e 100644 --- a/user_guide/database/queries.html +++ b/user_guide/database/queries.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/results.html b/user_guide/database/results.html index e9a5cb4cf..aec6c973a 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html index 90ce478da..d95802921 100644 --- a/user_guide/database/table_data.html +++ b/user_guide/database/table_data.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/transactions.html b/user_guide/database/transactions.html index 448e468d9..f6db30191 100644 --- a/user_guide/database/transactions.html +++ b/user_guide/database/transactions.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index 4a8b6739e..268cf49ae 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> |