I have this query on a MySQL table
SELECT * from cvisitor where SUBSTRING(last_time,1,10) >= '2016-01-27' and SUBSTRING(last_time,1,10) <= '2016-01-28' and email not like '%@lakos.com' order by last_time
There are a number of rows where the email IS like @lakos.com. They are not excluded.
If I do the following, it works.
SELECT * from cvisitor where email not like '%@lakos.com'
Why does not the first work? Do I need parens around date comparisons?