PHP Classes

CSV quotes

Recommend this page to a friend!

      Create CSV  >  All threads  >  CSV quotes  >  (Un) Subscribe thread alerts  
Subject:CSV quotes
Summary:CSV quotes are always true or false
Messages:2
Author:nlstart
Date:2007-07-11 11:39:50
Update:2007-07-13 08:45:32
 

  1. CSV quotes   Reply   Report abuse  
Picture of nlstart nlstart - 2007-07-11 11:39:50
Thanks for updating the class with the possibility to wrap elements with quotes.
However, to my humble opinion it should not be a parameter. The class itself should check if the database field is of the type 'Text', and if so apply the double quotes. For all other database field types the quotes should not be applied.

  2. Re: CSV quotes   Reply   Report abuse  
Picture of Ellery Leung Ellery Leung - 2007-07-13 08:45:32 - In reply to message 1 from nlstart
Hi

Thanks for your opinion.

Well, I don't really think that such checking should be applied, as most of the CSV are either have double quote on ALL values or NONE to all values. Another reason is that, it will be better to keep the result return to be simple. Otherwise, only quote the "TEXT" field may result in extra processing logic for programmers, which I personally don't like it.

But if you think that I should not think in this way, please let me know. Thanks again for your invaluable comments. Thanks.