From 40d1a7684444f6a8eb4cda23d8822f0b258f0c3e Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sun, 4 Sep 2011 13:57:52 +0100 Subject: Fixed incorrectly named variables in the documentation. --- user_guide/database/results.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide/database') 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
foreach ($query->result('User') as $user)
{
-    echo $row->name; // call attributes
-    echo $row->reverse_name(); // or methods defined on the 'User' class
+    echo $user->name; // call attributes
+    echo $user->reverse_name(); // or methods defined on the 'User' class
} -- cgit v1.2.3-24-g4f1b From 8c50c8e960e1549fc6168c60bbf6f179c80db2eb Mon Sep 17 00:00:00 2001 From: Kyle Farris Date: Fri, 9 Sep 2011 12:11:21 -0300 Subject: Documented an un-documented feature, the 'enclosures' parameter, to the documentation for DB Util's result_to_csv() method. --- user_guide/database/utilities.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'user_guide/database') diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index 8231c7e78..570e44713 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -183,14 +183,15 @@ $query = $this->db->query("SELECT * FROM mytable");
echo $this->dbutil->csv_from_result($query); -

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:

+

The second, third, and fourth parameters allow you to +set the delimiter, newline, 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:

$delimiter = ",";
$newline = "\r\n";
+$enclosure = '"';

-echo $this->dbutil->csv_from_result($query, $delimiter, $newline); +echo $this->dbutil->csv_from_result($query, $delimiter, $newline, $enclosure);

Important:  This function will NOT write the CSV file for you. It simply creates the CSV layout. -- cgit v1.2.3-24-g4f1b From 07f8fb3261c820d59019e21aa8ae29f9872cdb30 Mon Sep 17 00:00:00 2001 From: Kyle Farris Date: Fri, 9 Sep 2011 12:15:52 -0300 Subject: Forgot an 'and'... --- user_guide/database/utilities.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/database') diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index 570e44713..c80e3d106 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -184,7 +184,7 @@ echo $this->dbutil->csv_from_result($query);

The second, third, and fourth parameters allow you to -set the delimiter, newline, 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:

+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:

$delimiter = ",";
-- cgit v1.2.3-24-g4f1b From 61bb5012ba51ebbe5af11ef9d21741474f9f970d Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 11 Sep 2011 14:35:52 +0800 Subject: update user guide for replacing 'br/' with 'br /' --- user_guide/database/active_record.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide/database') 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); array or an object to the function. Here is an example using an array:

-$data = array(
+$data = array(
   array(
      'title' => 'My title' ,
      'name' => 'My Name' ,
@@ -540,7 +540,7 @@ $data = array(
      'title' => 'Another title' ,
      'name' => 'Another Name' ,
      'date' => 'Another date'
-   )
+   )
);

$this->db->update_batch('mytable', $data); @@ -783,4 +783,4 @@ Next Topic:  Transactions - \ No newline at end of file + -- cgit v1.2.3-24-g4f1b