Reputation: 276
Why MySQL in following query:
select * from `tips`
where `tips`.`tipster_id` = '16'
and `result` <> '0'
and `date` >= '2014-02-01'
and `date` <= '2014-02-28'
excludes rows with date 2014-02-28 ???
Upvotes: 0
Views: 51
Reputation: 161
I use this version
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'
Upvotes: 1
Reputation: 912
Do you store time values in that column? I guess that 2014-02-28 is this is the same as 2014-02-28 00:00:00.
So date values with a time after 00:00:00 will not be included.
Upvotes: 2