Yeti: Sortieren (MySQL) - bedingtes ORDER BY

Beitrag lesen

Hi,

vielleicht hilft dir folgender User Comment auf http://dev.mysql.com/doc/mysql/de/Sorting_rows.html weiter:
"If you want to explicitly specify the order of which 'order by' comes back in, like if you had a priority field that had the values "Low" "High" or "Medium" .. do this:

select * from tablename order by priority='High' DESC, priority='Medium' DESC, priority='Low" DESC;"

Also sollte ORDER BY size='32',size='34',size='36',...,size='S',size='M',...,size='XXXL' funktionieren.

Der Yeti

--
Habe nun, ach! WInfo, BWL, und Mathe, Und leider auch Info!
Durchaus studiert, mit heißem Bemühn. Da steh' ich nun, ich armer Thor!
Und bin so klug als wie zuvor!
sh:( fo:| ch:? rl:? br:  n4:& ie:( mo:| va:| de:[ zu:) fl:| ss:) ls:< js:|
http://community.de.selfhtml.org/fanprojekte/selfcode.htm