Skip navigation.

one wtf, two wtf, three wtf...ah ah ah!

Wonky Code

I had to confirm that this was production code. It's always more funny, or tragic, when production code is bad. Thanks to Søren for sending this in.

What's the most efficient way to skip a few numbers? Well it's not this way! It's bad enough that 2, 3 and 4 are literals and not constants, but they also represent database logic. At least they didn't select * and skip records with the wrong TypeId's.

The magic in

DB Hoopla | Wonky Code

Last week we looked at PHP's limited MySQL functionality. Today we have another example for the PHP guys to improve the MySQL library. That's sarcasm for those that missed it the first time.

On a more WTF note, I wonder what's inside Especially since it is included into the code like nine times! Anybody know the difference between using include() versus require()?

Thanks to Stefan for sending this in.