From 40d1a7684444f6a8eb4cda23d8822f0b258f0c3e Mon Sep 17 00:00:00 2001
From: Phil Sturgeon 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: 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 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:
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
echo $this->dbutil->csv_from_result($query);
-
$delimiter = ",";
$newline = "\r\n";
+$enclosure = '"';
-echo $this->dbutil->csv_from_result($query, $delimiter, $newline);
+echo $this->dbutil->csv_from_result($query, $delimiter, $newline, $enclosure);
$delimiter = ",";
--
cgit v1.2.3-24-g4f1b
From 61bb5012ba51ebbe5af11ef9d21741474f9f970d Mon Sep 17 00:00:00 2001
From: Bo-Yi Wu
-$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