Re: [PHP-DB] csv export...?

2004-01-13 Thread David T-G
Andre, et al -- [Sorry for the delay...] ...and then Andre Speelmans said... % % Hi David, Hi! % % On Fri, Jan 09, 2004 at 11:04:21AM -0500, David T-G wrote: % %header (Content-Type: application/csv;) ; # this is a CSV %header (Content-disposition: attachment;

Re: [PHP-DB] csv export...?

2004-01-11 Thread Andre Speelmans
Hi David, On Fri, Jan 09, 2004 at 11:04:21AM -0500, David T-G wrote: Tristan -- % Now I have found loadsa sites that let me upload a csv file, but not the % other way around... You might check PHPClasses to see if anyone has done this; I wouldn't be surprised. In general, though, you

[PHP-DB] csv export...?

2004-01-09 Thread Tristan . Pretty
Google is not my friend today... I have a reportng tool on a database i have, and I want to be able to exort the selected results (I've saved the SQL query as a session variable for ease of use) and save that data as a csv file... with headers if possible... Now I have found loadsa sites that

Re: [PHP-DB] csv export...?

2004-01-09 Thread Viorel Dragomir
Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 09, 2004 17:35 Subject: [PHP-DB] csv export...? Google is not my friend today... I have a reportng tool on a database i have, and I want to be able to exort the selected results (I've saved the SQL query

Re: [PHP-DB] csv export...?

2004-01-09 Thread Tristan . Pretty
To [EMAIL PROTECTED], [EMAIL PROTECTED] cc Subject Re: [PHP-DB] csv export...? You didn't try to hard isn't it! :) If you want to save a file as csv just save the vars like this 1,2,3 4,5,6 ... 0,0,0 If you want to link a csv file for download put a href='file.csv'download/a. It's not so

Re: [PHP-DB] csv export...?

2004-01-09 Thread David T-G
Tristan -- ...and then [EMAIL PROTECTED] said... % % Google is not my friend today... ... % Now I have found loadsa sites that let me upload a csv file, but not the % other way around... You might check PHPClasses to see if anyone has done this; I wouldn't be surprised. In general, though,

Re: [PHP-DB] csv export...?

2004-01-09 Thread Viorel Dragomir
PROTECTED] Sent: Friday, January 09, 2004 17:52 Subject: Re: [PHP-DB] csv export...? Cheers for prompt reply... But.. what? I need to take an SQL query, and export teh results to a csv file... Are you really sure that simply pointing to a non existant csv file does that? I don't see it somehow

Re: [PHP-DB] csv export...?

2004-01-09 Thread David T-G
Viorel, et al -- ...and then Viorel Dragomir said... % % It looks like is not so simple. But is not difficult at all.. Right. % ... % while($row = mysql_fetch_row($result)){ % print implode(,, $row); I agree that implode is a better way to go. I had to have my fields export in

Re: [PHP-DB] csv export...?

2004-01-09 Thread Tristan . Pretty
/2004 16:09 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] csv export...? It looks like is not so simple. But is not difficult at all.. Try to make something like: ?php header(Content-type: text/csv); $query = SELECT * FROM tables; $result = mysql_query($query

Re: [PHP-DB] csv export...?

2004-01-09 Thread David T-G
Tristan -- ...and then [EMAIL PROTECTED] said... % % Getting there... % That did indeed output my results to the screen... Yay! % Next steo is to output that same data to a new file... A file on the surfer's computer or a file on your server? % % I've done downloads on my site elsewhere,

Re: [PHP-DB] csv export...?

2004-01-09 Thread Tristan . Pretty
T-G [EMAIL PROTECTED] 09/01/2004 16:33 To PHP DB list [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] csv export...? Tristan -- ...and then [EMAIL PROTECTED] said... % % Getting there... % That did indeed output my results to the screen... Yay! % Next steo

Re: [PHP-DB] csv export...?

2004-01-09 Thread David T-G
Tristan -- ...and then [EMAIL PROTECTED] said... % % On the users computer... OK; that's what I figured. % When my bosses look at the reporting tool I built. % They are gonna hit the export link, and get directed to a page that let's % them save the data as a csv file, for use in excel.

Re: [PHP-DB] csv export...?

2004-01-09 Thread Tristan . Pretty
not honor the content-type it sends (see below). David T-G [EMAIL PROTECTED] 09/01/2004 16:42 To PHP DB list [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] csv export...? Tristan -- ...and then [EMAIL PROTECTED] said... % % On the users computer... OK; tha