为什么MySQL在以下查询中:
select * from `tips`
where `tips`.`tipster_id` = '16'
and `result` <> '0'
and `date` >= '2014-02-01'
and `date` <= '2014-02-28'
排除日期为 2014-02-28 ???的行
是否在该列中存储时间值?我猜 2014-02-28 是这个和 2014-02-28 00:00:00 一样。
因此,时间在 00:00:00 之后的日期值将不包括在内。
我使用这个版本
select * from `tips`
where `tips`.`tipster_id` = '16'
and `result` <> '0'
and `date` >= '2014-02-01 00:00:00'
and `date` <= '2014-02-28 23:59:59'