edlentz Posted April 8, 2006 Share Posted April 8, 2006 I need to export a table and I cna't seem to get it right. The format I need is: CSV with all fields enclosed with "" and null or empty fields with a 0 or o in them. Can this be done through a query?Thanks Link to comment https://forums.phpfreaks.com/topic/6877-table-export-format/ Share on other sites More sharing options...
fenway Posted April 9, 2006 Share Posted April 9, 2006 You can try the following:[code]SELECT ... INTO OUTFILE '<yourfile>' FIELDS TERMINATED BY "," LINES TERMINATED BY "\n";'[/code]Any conversion of null/blank to zeros will have to be done as part of the select column expression clause explicity. Link to comment https://forums.phpfreaks.com/topic/6877-table-export-format/#findComment-25286 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.