Doctrine - difference between bindValue() and setParameter() on prepared statements

Doctrine project logo.

This pissed me off and I couldn't figure out what I was doing wrong. So I'm blogging about my ignorance. Imagine you're using Symfony and Doctrine to access a database. You are using prepared statements to prevent any SQL injection problems. There are two main ways of doing this - and they disagree about how […]

Continue reading →

Using Soundex to find Duplicate Database Entries

Benches on a website. One is called "Bertie" the other "Bert".

Our community website - OpenBenches - has over seventeen thousand crowd-sourced entries. The nature of user-generated content is that there are bound to be duplicates. Especially around popular walking routes. Here's how I culled around 200 duplicates using the awesome power of SOUNDEX! Soundex is a clever algorithm for reducing a string of characters into […]

Continue reading →

HOWTO: Regenerate Gravatars in WordPress

The Logo for WordPress

A troublesome plugin recently corrupted some of the avatars on my blog's comments. This is a quick HOWTO for regenerating them. Gravatars are based on the MD5 hash of a user's email. For some reason, the plugin had overwritten the avatar field with the text http://identicon This MySQL query finds all the comment IDs which […]

Continue reading →

Open Source Shakespeare (in MySQL)

My good friend Richard Brent has often complained that my blog has very little Shakespeare content. Despite the domain name, I don't think I've ever blogged about The Big S. For shame! Fear not, my Brentish-Boy, this post is all about Shakespeare. And MySQL.... Ahem... When I first started it was intended to be […]

Continue reading →