1 SELECT * FROM menu WHERE dish_time < ‘datetime(“now”, “localtime”, “start of day”)’ AND finish_state = 2
SELECT * FROM menu WHERE ‘dish_time’ < ‘datetime(“now”, “localtime”, “start of day”)’ AND finish_state = 2
像上方是两种完全不同的结果,想表达式达到预期的效果。则字段与值一样的写法。单引号要有都有,没有单引号就都不要写单引号
2 sqlite多种排序方式,直接是不同字段逗号隔开。如:select * from menu order by dish_time,menu_name desc