Page 1 of 1

How can i write fetched data from mysql database to csv file

Posted: Mon Jul 17, 2006 3:45 am
by B.Murali Krishna
hello,
how can if write the data which i queiried from database, to csv file and i need to down load that file,
if used fputcsv($fp, split(',', $line));
but this function not supported in some vesions i think

this was my applications, please help me regaring this topic.

Regards,
Murali

Posted: Mon Jul 17, 2006 3:59 am
by Christopher
Usually you send the proper headers and then start fetching rows, implode each row with the field delimiter, and echo with the line delimiter appended.