使用如下查询:
SELECT * FROM images WHERE id IN (12,9,15,3,1)
是否可以按IN子句的内容对结果进行排序?
我正在寻找的结果将是:
[0] => Array
(
[id] => 12
[file_name] => foo
)
[1] => Array
(
[id] => 9
[file_name] => bar
)
[2] => Array
(
[id] => 15
[file_name] => baz
)
...