diff options
author | Darren Hill <dchill42@gmail.com> | 2011-09-12 13:57:04 +0200 |
---|---|---|
committer | Darren Hill <dchill42@gmail.com> | 2011-09-12 13:57:04 +0200 |
commit | 00fcb545109d4e61bc14e403ec828749c34a54b3 (patch) | |
tree | 336473d0e3a85ce90cc463784f631c3d52462605 /user_guide/database | |
parent | 826675178c2c2ad697e5ac55161645abd9143bef (diff) | |
parent | 869e3721d75e9798a706d24d93170f44e5ab6cb3 (diff) |
Updated cookie driver to latest develop changes
Diffstat (limited to 'user_guide/database')
-rw-r--r-- | user_guide/database/active_record.html | 6 | ||||
-rw-r--r-- | user_guide/database/results.html | 4 | ||||
-rw-r--r-- | user_guide/database/utilities.html | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 0f09e78c3..10259a4af 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -530,7 +530,7 @@ $this->db->insert('mytable', $object); <strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p> <code> -$data = array(<br/> +$data = array(<br /> array(<br /> 'title' => 'My title' ,<br /> 'name' => 'My Name' ,<br /> @@ -540,7 +540,7 @@ $data = array(<br/> 'title' => 'Another title' ,<br /> 'name' => 'Another Name' ,<br /> 'date' => 'Another date'<br /> - )<br/> + )<br /> );<br /> <br /> $this->db->update_batch('mytable', $data); @@ -783,4 +783,4 @@ Next Topic: <a href="transactions.html">Transactions</a> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/database/results.html b/user_guide/database/results.html index ec5f97762..a47e335cb 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -105,8 +105,8 @@ Query Results <br /> foreach ($query->result('User') as $user)<br /> {<br /> - echo $row->name; // call attributes<br /> - echo $row->reverse_name(); // or methods defined on the 'User' class<br /> + echo $user->name; // call attributes<br /> + echo $user->reverse_name(); // or methods defined on the 'User' class<br /> } </code> diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index 8231c7e78..c80e3d106 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -183,14 +183,15 @@ $query = $this->db->query("SELECT * FROM mytable");<br /> echo $this->dbutil->csv_from_result($query); </code> -<p>The second and third parameters allows you to -set the delimiter and newline character. By default tabs are used as the delimiter and "\n" is used as a new line. Example:</p> +<p>The second, third, and fourth parameters allow you to +set the delimiter, newline, and enclosure characters respectively. By default tabs are used as the delimiter, "\n" is used as a new line, and a double-quote is used as the enclosure. Example:</p> <code> $delimiter = ",";<br /> $newline = "\r\n";<br /> +$enclosure = '"';<br /> <br /> -echo $this->dbutil->csv_from_result($query, $delimiter, $newline); +echo $this->dbutil->csv_from_result($query, $delimiter, $newline, $enclosure); </code> <p><strong>Important:</strong> This function will NOT write the CSV file for you. It simply creates the CSV layout. |