Answer the question
In order to leave comments, you need to log in
How best to sort?
Good afternoon.
A query to the MySQL database (without sorting the result) returns a list:
Sword Art Online 1 ED
Sword Art Online 1 OP
Sword Art Online 2 ED
Sword Art Online 2 OP
Sword Art Online Movie ED
Sword Art Online 2 OST
Sword Art Online 1 OP
Sword Art Online 1 ED
Sword Art Online 2 OP
Sword Art Online 2 ED
Sword Art Online 2 OST
Sword Art Online Movie ED
Answer the question
In order to leave comments, you need to log in
Add column order.
Or adding [1] [2] [3] at the beginning of each name might help.
Do you need additional sorting on the last field?
ORDER BY FIELD(priority, 'OP', ED', 'OST');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question