I've got a table with around 40000 records. There's a column called v_pop
with a range of 2 - 1000. I'd like to color code some HTML but use the query
to do that work. So check out the code below. It runs just fine, with no
errors, BUT, it only returns white and pink as the class, even though I know
for a fact that there are records with higher values. What am I doing wrong
here?
I'm running mySQL 4.1.17
SELECT v_player,
CASE
WHEN v_pop < 49 THEN 'white'
WHEN v_pop > 50 < 99 THEN 'pink'
WHEN v_pop > 100 < 199 THEN 'salmon'
WHEN v_pop > 200 < 299 THEN 'yellow'
WHEN v_pop > 300 < 299 THEN 'orange'
WHEN v_pop > 400 < 399 THEN 'red'
WHEN v_pop > 500 < 499 THEN 'brick'
END AS class
FROM x_world
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241938
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54