NYCPHP Meetup

NYPHP.org

[nycphp-talk] Downloading a CSV file

Faber Fedor faber at linuxnj.com
Tue Sep 7 22:45:55 EDT 2004


Hi all,

I'm building a webapp (a telemarketing tracking thingie) and I'm trying
to figure out the best way to do the following:

I want my worker bee to click on a link and download a CSV file that she
will then use in a mail-merge.  The only way I can think of doing it I
don't like.  I'm sure there's a better, PHP Approved Way (TM).

The only way I can think of doing it is to send a query via PHP to MySQL and
telling MySQL to dump the data to a textfile in the website directory via
SELECT...INTO OUTFILE..., then have PHP redirect to that file, and then
delete the file. I don't like that way.

The only other thing I can think of is to have PHP grab the
dataset, format the data as CSV and then...what?  Display it in her
browser and have her do a File->Save?  Not nice, IMO.

Any brilliant ideas?

-- 
 
Regards,
 
Faber                     

Linux New Jersey: Open Source Solutions for New Jersey
http://www.linuxnj.com






More information about the talk mailing list