I have the following query:
SELECT * FROM incomings WHERE date >= '2011-04-01%' AND date <= '2011-04-29%'
And it shows results from 01-04 to 28-04. This may be a weird question but, it I think it should show results from 29-04 too, right?
What’s wrong?
Your syntax is odd. That query would normally be written:
I think from the way that you’re trying to query the data that your
datecolumn is actually aDATETIMEorTIMESTAMPcolumn. If that’s the case then'2011-04-29%'will be being cast to'2011-04-29 00:00:00'I would recommend you use this SQL instead: