xiven.com stating the blatantly obvious since 2002

This is optimising

Hideous code, the like of which you have never seen before and will hope never to see again:

UPDATE tech SET progress = GREATEST(progress - round(((assigned / 100) * (IF(user_id = 1,0,(IF(user_id = 2,162,(IF(user_id = 3,162,(IF(user_id = 4,162,(IF(user_id = 5,0,(IF(user_id = 12,0,(IF(user_id = 13,0,(IF(user_id = 15,165,(IF(user_id = 6,33,(IF(user_id = 21,123.75,(IF(user_id = 26,33,(IF(user_id = 28,27,(IF(user_id = 27,0,(IF(user_id = 29,0,(IF(user_id = 39,0,(IF(user_id = 44,32.4,(IF(user_id = 45,1069.36911,(IF(user_id = 47,277.2,(IF(user_id = 48,105.3,(IF(user_id = 49,196.04151,1)))))))))))))))))))))))))))))))))))))))))), 0) WHERE user_id IN (1,2,3,4,5,12,13,15,6,21,26,28,27,29,39,44,45,47,48,49) AND progress != 0 AND assigned > 0

20 updates for the price of one.

Posted: 2003-01-25 14:14:53 UTC by Xiven | Cross-references (1) | Comments (0)

Comments

None