Hallo Jörn,
select distinct kategorie, length(kategorie) from $table order by length(kategorie)
select distinct kategorie, length(kategorie) as IRGENDEINNAME from $table order by IRGENDEINNAME;
So hat es bei mir funktioniert. MySQL stoert sich daran, dass der Funktionsaufruf am Ende noch einmal erscheint.
Bei count(*) scheint das allerdings zu funktionieren.
Gruss
Beate Mielke