Category Archives: Code Snippets

June 30, 2011

Show a user’s order history on “My Account” in Cart66

This isn’t a full tutorial, just some code for people to use. I’m working on a site that’s using Cart66 for their online store. Unfortunately, Cart66 doesn’t come with a function or shortcode for displaying a logged-in user’s purchase history. I made a somewhat comprehensive “My Account” page that does just that.

June 5, 2009

PHP code for exporting a MySQL table to a CSV file

After a lot of searching, and a lot of troubleshooting, I finally found PHP code for exporting a CSV file from MySQL that works perfectly! This might be old news to some, but I’d never done it before and I needed to have that export feature on my Store Locator plugin. $result = mysql_query(“SHOW COLUMNS [...]