数据库对应的日期字段是datetime类型,给的日期为字符串类型:
select * FROM picture WHERE tasktype='L' AND picturetime >=str_to_date('2017-09-05 18:10:02', '%Y-%m-%d %H:%i') AND picturetime < str_to_date('2017-09-05 18:11:02', '%Y-%m-%d %H:%i') ORDER BY picturetime ASC
注意条件是否正确。
亲测好使