Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在数据库表中有四行。我希望他们按以下顺序订购
id 5 8 6 7
我该怎么做?
我不能在另一列中设置顺序,因为 DB 表不是我的自定义表,它是由 CMS 插件提供的。所以改变表的结构并不是一个好主意。
试试这个,
SELECT.. FROM... WHERE... Order By Field(ID,5,8,6,7)