select SUBSTRING_INDEX(identifier, '-', 1) AS myorder, identifier from schiffe where ( ( (fn_klassenname like '%bm-jolle%' OR fn_klasse_name like '%bm-jolle%' OR fn_klasse_bezeichnung like '%bm-jolle%' OR fn_klasse_typ like '%bm-jolle%' ) ) AND identifier like '%schiffe%' AND fn_registername = 'rky' ) ORDER BY myorder, fn_registername, fn_klassenname, fn_name, fn_segelnummer, fn_baujahr 685select SUBSTRING_INDEX(identifier, '-', 1) AS myorder, identifier from schiffe WHERE (fn_klassenname regexp '.*7 [Kk][Rr].*' OR fn_klasse_name regexp '.*7 [Kk][Rr].*' OR fn_klasse_bezeichnung regexp '.*7 [Kk][Rr].*' OR fn_klasse_typ regexp '.*7 [Kk][Rr].*' ) Fertch