Soooo nice:
SELECT * FROM `menu` WHERE weight != 0 ORDER BY (CASE type WHEN 118 THEN 2 WHEN 54 THEN 4 END) DESC
Far more and better examples can be found at Phase2
- Tags
- mysql
Soooo nice:
SELECT * FROM `menu` WHERE weight != 0 ORDER BY (CASE type WHEN 118 THEN 2 WHEN 54 THEN 4 END) DESC
Far more and better examples can be found at Phase2