diff options
-rw-r--r-- | user_guide/database/active_record.html | 28 |
1 files changed, 14 insertions, 14 deletions
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);<br /> <code>
$data = array(<br />
- 'title' => $title,<br />
- 'name' => $name,<br />
- 'date' => $date<br />
+ 'title' => 'My title' ,<br />
+ 'name' => 'My Name' ,<br />
+ 'date' => 'My date'<br />
);<br />
<br />
$this->db->insert('mytable', $data);
<br /><br />
-// Produces: INSERT INTO mytable (title, name, date) VALUES ('{$title}', '{$name}', '{$date}')</code>
+// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')</code>
<p>The first parameter will contain the table name, the second is an associative array of values.</p>
@@ -421,9 +421,9 @@ $this->db->insert('mytable', $data); <code>
/*<br />
class Myclass {<br />
- var = $title = 'My Title';<br />
- var = $content = 'My Content';<br />
- var = $date = 'My Date';<br />
+ var $title = 'My Title';<br />
+ var $content = 'My Content';<br />
+ var $date = 'My Date';<br />
}<br />
*/<br />
<br />
@@ -431,7 +431,7 @@ $object = new Myclass;<br /> <br />
$this->db->insert('mytable', $object);
<br /><br />
-// Produces: INSERT INTO mytable (title, name, date) VALUES ('{$title}', '{$name}', '{$date}')</code>
+// 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>
@@ -474,9 +474,9 @@ $this->db->insert('mytable'); <code>
/*<br />
class Myclass {<br />
- var = $title = 'My Title';<br />
- var = $content = 'My Content';<br />
- var = $date = 'My Date';<br />
+ var $title = 'My Title';<br />
+ var $content = 'My Content';<br />
+ var $date = 'My Date';<br />
}<br />
*/<br />
<br />
@@ -516,9 +516,9 @@ $this->db->update('mytable', $data); <code>
/*<br />
class Myclass {<br />
- var = $title = 'My Title';<br />
- var = $content = 'My Content';<br />
- var = $date = 'My Date';<br />
+ var $title = 'My Title';<br />
+ var $content = 'My Content';<br />
+ var $date = 'My Date';<br />
}<br />
*/<br />
<br />
|