PDA

View Full Version : MySQL export to CSV


kevinhankens
1-2-05, 02:27 AM
Greetings! I was wondering if anyone has any experience with exporting a MySQL database table to a CSV file. I know that you can do this easily via PHPMyAdmin, but I am building a script for someone who won't have access to that program.

The best option seems to be the MySQL command "SELECT INTO", but I don't have a lot of MySQL experience. It seems that you could do a simple script that exports the contents of a table, but I'm not sure how to target a directory on the web server using that command through a PHP script.

Any thoughts? I'd love to hear what others have done. :)

Thanks!

Kevin