How to make MySQL spit out CSV’s

mysqlDon’t you hate it when you know you solved a problem three years ago but you can’t remember what the solution was? I ran into that recently. I was trying to make mysql generate a csv directly from query results. I remembered that you can do it, and I had an example of the correct syntax to use in my old code, and I had a query that did it just fine when running in the mysql CLI as root. I had to piece together the answer from several different sources; and none of them told the whole story. So here is the full story, along with all the stumbling blocks that I know of.
Continue reading How to make MySQL spit out CSV’s

OW! Zend Framework bit me OR Careful with that config

Ouch! I just solved a puzzling error in Zend Framework. It was telling me that I had an illegal file name. While the trace never did point to the exact line in my code that triggered it, it clearly had something to do with a PDO_SQL database.

I checked the database . . . → Read More: OW! Zend Framework bit me OR Careful with that config

Column Comments in MySQL

A while back I was lamenting that table comments in MySQL  get overlooked, and did a post on it, both how to create them, how to update them, and how to view them.  The fact that my table comment post remains quite popular indicates that mySQL hasn’t SEO’d their pages on it thoroughly enough, and people are obviously looking for information on it. So… I thought I should follow with a column comment post. As a matter of fact in mySQL you can also comment at the column level, and probably should whenever the function of a field is not obvious.
Continue reading Column Comments in MySQL