one wtf, two wtf, three wtf...ah ah ah!
Submitted by phrax on Wed, 2004-12-01 10:17. Wonky CodeI 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 header.inc.php...
Submitted by phrax on Tue, 2004-11-30 09:50. DB Hoopla | Wonky CodeLast 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 header.inc.php. 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.