SELECT DISTINCT y.*
FROM my_table x
JOIN my_table y
ON y.category = x.category
ORDER
BY y.title="dog" DESC
, y.category;
or something like that
1
solved Sort by field values in MySQL Query [closed]
SELECT DISTINCT y.*
FROM my_table x
JOIN my_table y
ON y.category = x.category
ORDER
BY y.title="dog" DESC
, y.category;
or something like that
1
solved Sort by field values in MySQL Query [closed]