I am working on putting a MySQL statement together and am wondering what the problem is with it. Why doesn't this MySQL statement work?
SELECT *
FROM `deals`
WHERE CATEGORY NOT
IN 'Construction & Repair'
AND (
EXPIRE_DATE >= NOW()
OR EXPIRE_DATE IS NULL
)
AND LOCATION = 'Melbourne'
AND STATUS = 'Active'
LIMIT 0 , 1000
I get the following error message:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Construction & Repair' AND ( EXPIRE_DATE >= NOW( ) OR EXPIRE_DATE IS NULL ) AND' at line 1