Legacy Bitmask Puzzle
Code: , , ,
1 comment

My friend David had a puzzle in his legacy app. There’s a bitmask called ErrorCode. The table ErrorCodes lists the meaning of each bit:

Continue this post

Turning WordPress Categories Into Tags
Code: , , , ,
2 comments

I recently updated this WordPress install from 2.2.something to 2.5 and noticed that it now supports tags instead of just categories. I had been using categories as tags, but I’d rather built-in tags than fake it anymore. I didn’t want to manually retag a couple hundred posts with ~200 tags, so I wrote some SQL to do it for me. If you’re in the same boat

Continue this post

Alphabetical Sorting SQL Without “The”
Code: , , ,
1 comment

Chris McAvoy asked how to sort alphabetically so that entries starting with “A”, “An”, or “The” end up in the proper place instead of jumbled into the As and Ts.

Continue this post