MySQL Enum field not ordering correctly
Thats because: It will order in the order the enum values are defined at table level – not the actual varchar/int/etc value. Fix: SELECT CAST(a.enumfield AS CHAR(255)) AS enumfield, a.* FROM `mytable` a ORDER BY...
Read More