anujgarg Posted December 12, 2009 Share Posted December 12, 2009 Hello, How can I export csv data (for MySQL records) by writing PHP code? Please suggest... TIA Anuj Link to comment https://forums.phpfreaks.com/topic/184879-csv-file-in-php/ Share on other sites More sharing options...
cags Posted December 12, 2009 Share Posted December 12, 2009 MySQL supports SELECT ... INTO OUTFILE, you can run a single line (plus connecting to the DB) of code that will export your MySQL database to a CSV file on the server. http://dev.mysql.com/doc/refman/5.0/en/select.html Link to comment https://forums.phpfreaks.com/topic/184879-csv-file-in-php/#findComment-975976 Share on other sites More sharing options...
rajivgonsalves Posted December 12, 2009 Share Posted December 12, 2009 if you want to do it in php and are using PHP 5 you can use the following function http://www.php.net/manual/en/function.fputcsv.php Link to comment https://forums.phpfreaks.com/topic/184879-csv-file-in-php/#findComment-975981 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.