p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   exporting to csv format (http://p2p.wrox.com/showthread.php?t=1557)

dazednconfused July 11th, 2003 12:59 PM

exporting to csv format
I had previously, as my website is still in the design phase, using a SELECT INTO OUTFILE query to export selected details to a csv file. I have now noticed that this isnt going to be usefull because I cant export the records to anywhere other than the mysql folder on the host machine. So now I was thinking of using a mysqldump instead, however I dont know how to phrase it, I have tried looking but the answers I have found have been confusing at best.

I was wondering if anyone could give me an example? I just want the details enclosed by " and seperated by ,

nikolai July 11th, 2003 03:31 PM

Try looking through the phpMyAdmin source code. They've got all the source it takes to dump a table or database to CSV file, including the appropriate header() calls with mime-types to trigger the browser to save the csv dump as a file download. When I did the same thing, I used their code as a starting point, but modified it to suit my own needs for the site I was building at the time.

Take care,


All times are GMT -4. The time now is 01:47 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.