I've shorttened it for easier understanding...
SELECT 10 fields, 1 virtual field FROM table WHERE (this OR that) AND (this OR that) AND (so on) ORDER BY the virtual field
The virtual field is setup as:
IF (field1 = 'this',2, IF (field1 = 'that',1,0))
there are about 9 IFs.
Now to the question:
Is it possible to sub-order the virtual field?
example:
+------+------+
|field1|field2|
+------+------+
|this | A |
+------+------+
|that | B |
+------+------+
|this | C |
+------+------+
|that | D |
+------+------+
Results are returned (due to various fields):
D - that
B - that
A - this
C - this
so the virtual field is doing its job - but they also have to be ordered again to appear in alphabetical order as:
B - that
D - that
A - this
C - this
Is it possible or am I just thinking wishfully?
Mark
If that isn't enough of an example check out the real thing: http://www.gameguys.cc/results.php?game=wa&sets[]=TLC&rarity[]=Rare