In a previous post I discussed the stumbling blocks and security concerns that the mysql documentation doesn’t tell you about having a mysql user create csv files on the filesystem.
I ran into yet another issue. In order to do what I want with these csv’s, they have to have column headers. I thought surely by now MySQL must have come up with some syntax in the query to do this, but Paul DuBois assured us all in a 2006 forum post, that there is no such thing. I thought maybe Zend Framework might have such a thing in it’s DB class, but I didn’t locate one. Correct me if I’m wrong–Zend Framework is huge, and I might have missed it.
So, what to do? We have several options:
Continue reading MySQL CSV’s with column headings — Part 1