Use ORDER BY FIELD(name, 'Apple', 'Banana') in django

前端 未结 0 394
别跟我提以往
别跟我提以往 2020-12-20 00:10

I would like to use ORDER BY FIELD() (MySQL) in Django. Does Django support that?

So in MySQL it looks like:

SELECT * FROM fruit 
ORDER BY FIELD(name         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题