Author Archives: Michael Sharman

December 7, 2010
Adding Prototype methods to jQuery

We recently upgraded a project which was using the Prototype JavaScript framework to use jQuery and ran into a few methods which didn’t exist in jQuery at all. A quick search gave us an easy solution; by adding a prototype property (not related to the Prototype framework) to String.prototype we can give every `string` in [...]

November 14, 2010
Importing a csv into MySQL using the command line

UPDATE 16th Nov 2010: I had some issues with the import which I noted in the first code example below Today I had to import csv into a single mysql table. The destination table only had 5 columns and the csv was around 22MB (around 400,000 records). The csv also contained more columns that I [...]

October 4, 2010
Case sensitive development on Mac OS X

At work most of the developers are on Mac OS X but our staging and production environments are Linux based. This means development is case insensitive but stage/production is case sensitive. Although we have development guidelines/standards which dictate file and database naming conventions etc, human error can still occur (in terms of referencing files with [...]

September 8, 2010
Tip when adding “allowMultiQueries=true” to your MySQL DSN in ColdFusion

Scenario…I’m using ColdFusion 9 and MySQL 5. I already had my DSN setup but had a requirement to get the last inserted id from a MySQL INSERT statement (I’m using auto-incrementing integer’s). As most people know, the best way to do this (in MySQL) is using the last_insert_id() function. I wanted to attach this to [...]

May 27, 2010
CFML issue on Railo with the accelerate cache tag

We’ve been using Brandon Purcell’s excellent accelerate custom cache tag for a few projects. I had an issue today while testing a new app which is about to go live. It seemed that whatever I did nothing would be cached. Upon investigation it seemed that the caching worked fine on Adobe ColdFusion but not on [...]