sqlite/php - order by 'input order' - with imploded query

Solution:
In SQL, tables always are unordered; there is no guarantee that a query uses any specific order.
If you want to get the rows in a specific order, you have to explicitly sort them by using ORDER BY in the query.
If there isn't some table data that you can use directly for sorting, you have to use a CASE expression to map the table values to some values usable for sorting:
SELECT ...
ORDER BY CASE WordColumn
WHEN '隔' THEN 1
WHEN '山' THEN 2
WHEN '买' THEN 3
WHEN '老' THEN 4
WHEN '牛' THEN 5
END;
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: http failure during parsing for
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.