diff options
author | Timothy Warren <tim@timshomepage.net> | 2011-09-13 17:24:30 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2011-09-13 17:24:30 +0200 |
commit | 8ee6c9379023df6594581e70827ba6196b3a2165 (patch) | |
tree | 132a98413f34d44a9e4bd6f2d184691ee203a6b9 /user_guide/database/utilities.html | |
parent | 770c8677207be0a9091456b8d763bfd0e5456606 (diff) | |
parent | 869e3721d75e9798a706d24d93170f44e5ab6cb3 (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'user_guide/database/utilities.html')
-rw-r--r-- | user_guide/database/utilities.html | 7 |
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> This function will NOT write the CSV file for you. It simply creates the CSV layout. |