summaryrefslogtreecommitdiffstats
path: root/user_guide/database
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-09-09 18:50:06 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-09-09 18:50:06 +0200
commit57ace979bec81528480d511e0ca24c70c6ce5359 (patch)
tree7467320dc49fcfeb0f1b7fbaa1707dedabfb89d6 /user_guide/database
parentbf5fb497ba94964bffc67669e36477558f69b517 (diff)
parent07f8fb3261c820d59019e21aa8ae29f9872cdb30 (diff)
Merge pull request #422 from kylefarris/patch-5
Undocumented result_to_csv() parameter
Diffstat (limited to 'user_guide/database')
-rw-r--r--user_guide/database/utilities.html7
1 files changed, 4 insertions, 3 deletions
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>&nbsp; This function will NOT write the CSV file for you. It simply creates the CSV layout.