From f553b113416c3631cf2fd6120c8c273023ea545f Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Fri, 2 Feb 2007 03:47:13 +0000 Subject: typo in example --- user_guide/database/active_record.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'user_guide/database') diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 087d3e1ff..d0657cda8 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -405,14 +405,14 @@ $this->db->limit(10, 20);
$data = array(
-               'title' => $title,
-               'name' => $name,
-               'date' => $date
+               'title' => 'My title' ,
+               'name' => 'My Name' ,
+               'date' => 'My date'
            );

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

-// Produces: INSERT INTO mytable (title, name, date) VALUES ('{$title}', '{$name}', '{$date}')
+// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')

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

@@ -421,9 +421,9 @@ $this->db->insert('mytable', $data); /*
    class Myclass {
-        var = $title = 'My Title';
-        var = $content = 'My Content';
-        var = $date = 'My Date';
+        var $title = 'My Title';
+        var $content = 'My Content';
+        var $date = 'My Date';
    }
*/

@@ -431,7 +431,7 @@ $object = new Myclass;

$this->db->insert('mytable', $object);

-// Produces: INSERT INTO mytable (title, name, date) VALUES ('{$title}', '{$name}', '{$date}')
+// Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')

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

@@ -474,9 +474,9 @@ $this->db->insert('mytable'); /*
    class Myclass {
-        var = $title = 'My Title';
-        var = $content = 'My Content';
-        var = $date = 'My Date';
+        var $title = 'My Title';
+        var $content = 'My Content';
+        var $date = 'My Date';
    }
*/

@@ -516,9 +516,9 @@ $this->db->update('mytable', $data); /*
    class Myclass {
-        var = $title = 'My Title';
-        var = $content = 'My Content';
-        var = $date = 'My Date';
+        var $title = 'My Title';
+        var $content = 'My Content';
+        var $date = 'My Date';
    }
*/

-- cgit v1.2.3-24-g4f1b