The original version of foursquare.com contained a lot of stuff like this (though not as epicly bad). It was a very small amount of poorly written PHP code surrounding a bunch of unreadable SQL statements. It's amazing that it worked at all.
Dens is a great guy, but I hope I never have to rewrite his code again.
Dens is a great guy, but I hope I never have to rewrite his code again.