开发者

How do I write this query in Django?

开发者 https://www.devze.com 2022-12-25 08:31 出处:网络
Suppose开发者_如何学运维 I have a datetime column. \"SELECT * FROM mytable WHERE thetime < INTERVAL 1 HOUR\"

Suppose开发者_如何学运维 I have a datetime column.

"SELECT * FROM mytable WHERE thetime < INTERVAL 1 HOUR"

How do you write this in Django?


MyModel.objects.extra(where=['thetime < INTERVAL 1 HOUR'])
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号