Answer the question
In order to leave comments, you need to log in
How to solve the problem with such sorting?
There is a request like
SELECT * FROM `table` ORDER by `price` DESC
Answer the question
In order to leave comments, you need to log in
A universal solution is to sort by a calculated expression.
Well, or for frequent use of a large list - by the sort_order field of the attached table
ORDER BY CASE ID WHEN 3 THEN 1 WHEN 5 THEN 2 ELSE 3 END, Price DESC
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question