PHP and MySQL: Export a Query to a Tab Delimited File

This weekend I wanted to build a page that would simply backup any query or table into a Tab Delimited file. Most of the examples out on the net have the columns hard-coded. In my case, I wanted the columns to be dynamic so I had to first loop through all the table field names to build the header row with column names, and then loop through all the records for the remaining data rows.

MySQL Query for Pulling Categories in WordPress

Recently, it appeared that the posts that I wrote about my home life appeared to get more page views than some of my other topics. It would support that the personal aspect of blogging is what attracts more readers so I wanted to find out. Any of my posts that touch on my personal life, I add a specific query to. The rest of the categories are applied based on content. I did this on