Say you want to sort your query results in a specific predefined order. Just add the following to your query:
ORDER BY FIELD(column, ‘first thing’, ‘second thing’, ‘next thing’, ‘last thing’)
Unfortunately, if there are other unknown entries in `column`, they will be sorted ABOVE your predefined list. The solution is to reverse your list and add the DESC parameter as such:
ORDER BY FIELD(column, ‘last thing’, ‘next thing’, ‘second thing’, ‘first thing’), DESC
Also be sure there is no space between FIELD and ( or MySQL will give an error about FIELD not being in your table.