How to put item in a specific position?
I'd like to put item on a 5th position:
`id`='randomId243'
So far my sorting looks like that:
ORDER BY
CASE
WHEN `id` = 'randomId123' THEN 0
WHEN `id` = 'randomId098' THEN 1
ELSE 2
END, `name` ASC
I don't know yet which id will be in position 2,3,4. I'd prefer to avoid run another query/subquery to get ids of items from position 2-4
So final order should be like this:
- randomId123
- randomId098
- just item alphabetical
- just item alphabetical
- just item alphabetical
- randomId243
- just item alphabetical