I have the following table:
id name type
-- ---- -----
1 Joe H
1 Zoe F
2 Ken F
2 Ben H
3 Lime H
4 Fine F
5 Lima F
5 Sima H
I want to select first the rows that match:
id: 5 & type: H
id: 2 & type: F
id: 3 & type: H
And after them the rest ordered by id ASC.
So the final result should be:
id name type
-- ---- -----
5 Sima H
2 Ken F
3 Lime H
1 Joe H
1 Zoe F
2 Ben H
4 Fine F
5 Lima F
I just couldn't find how to show first specific rows sorted by more than one value. I use PHP and MySqli if that helps.
Thanks