How can I use the results in my CASE pieces to help me ORDER?
Below a simple just to understand example.
WHEN column_a > 10 THEN 1
WHEN column_a > 100 THEN 2
END AS helpme_a,
WHEN column_b > 10 THEN 50
WHEN column_b > 100 THEN 100
END AS helpme_b
ORDER BY (helpme_a * helpme_b)
As you can see, I would like to use results from the CASEs in my ORDER
Can this be done?
A second question, maybe relevant as well, is this. On my home
computer I can use calcualtions in the ORDER BY (like ORDER BY (blabla
* blibli) ) but when I upload this to my server this doesn't work
anymore. They both use MySQL 5.0. Where could be the problem?
Hope anyone can help,