FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Send .csv file to browser
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Send .csv file to browser [message #170021 is a reply to message #170017] Tue, 05 October 2010 18:06 Go to previous messageGo to previous message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma:
Senior Member
On 10/5/2010 12:52 PM, Derek Turner wrote:
> On Tue, 05 Oct 2010 12:05:34 -0400, Jerry Stuckle wrote:
>
>> Right idea, but some problems. First of all, what happens if a field
>> contains a comma i.e. "Smith, Jr.".
>
> Never thought of that, it's not something we would even consider in
> Britain, nor 2nd or 3rd.
>
>
>> Text fields also need to be
>> surrounded by double quotes, and any double quotes in the text field
>> must be doubled to be a valid CSV file.
>
> When TB exports a csv it doesn't quote text fields so presumably it
> doesn't need them quoted to import them:

What if I have in there that my nickname is Shelly ("sheldonlg")? How
does the db have the " in the table? How is that retrieved? How does
that appear when written to the browser? What if single quotes are used
as in O'Reilly? That is what Jerry is talking about. You always have
to be concerned with things like this.

>
> <export>
> First Name,Last Name,Display Name,Nickname,Primary Email,Secondary
> Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile
> Number,Home Address,Home Address 2,Home City,Home State,Home ZipCode,Home
> Country,Work Address,Work Address 2,Work City,Work State,Work ZipCode,Work
> Country,Job Title,Department,Organization,Web Page 1,Web Page 2,Birth
> Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes,
> ,,Tim(at)Wynsors(dot)com,,newsletter(at)mail(dot)wynsors(dot)com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> ,,247Spares,,no-reply(at)247spares(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> ,,Novatech,,ewmail(at)novatech(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> ,,,,newsletter(at)maplin(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> </export>
>
>> Also, some places use a
>
> Use a what?
>
>>
>> Then just output directly with the appropriate headers.
>
> Yes, I like the idea of an output buffer downthread.
>


--
Shelly
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: file access permission?
Next Topic: Process queue without cron jobs
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 09:29:17 GMT 2024

Total time taken to generate the page: 0.04016 seconds