From bf8d68a5652e52c39c59c7e441dcb4fe1ccd15cf Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Sun, 24 Apr 2011 20:38:17 -0400 Subject: Duplicate this->db->insert_batch in documentation. Fixes #202 --- user_guide/database/active_record.html | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'user_guide') 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 @@ -525,30 +525,6 @@ $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' ,
-      'name' => 'My Name' ,
-      'date' => 'My date'
-   ),
-   array(
-      'title' => 'Another title' ,
-      'name' => 'Another Name' ,
-      'date' => 'Another date'
-   )
-);
-
-$this->db->insert_batch('mytable', $data); -

-// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date'), ('Another title', 'Another name', 'Another date')
- -

The first parameter will contain the table name, the second is an associative array of values.

- -

$this->db->insert_batch();

-

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(
-- cgit v1.2.3-24-g4f1b