I have a SQL statement something along these lines:
SELECT * FROM `table` WHERE some_column IN(1,58,22,9);
What I would like is to return the rows in the same order as the some_column values are specified, i.e. 1 before 58 before 22 before 9. The problem is that I have no column that, when sorted, will produce this specific order of rows.
Is there any way I can achieve this?
Use the FIND_IN_SET function: