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') 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') 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