I get an syntax error with the following SQL PDO Statement, can you tell me where the mistake is?
Thank you!
SELECT *
FROM events
WHERE
(start_date BETWEEN '2013-01-14' AND '2013-01-20')
OR (start_date NOT < '2013-01-14' and end_date > '2013-01-20')
You can’t put
NOTin the middle of an expression, it goes before the expression:Or use the complement to the
<operator, which is>=:(The exception in the usage of
NOTis with theIS NULLoperator, where bothNOT x IS NULLandx IS NOT NULLworks.)