problem with mysql statement OR
Posted on 2009-07-03
for some reason when i use this mysql statement:
SELECT COUNT(*) FROM projects JOIN link_projects_zones ON projects.proj_ID = link_projects_zones.proj_ID WHERE link_projects_zones.zone_ID = 1 AND projects.proj_Status = 2 or 3 or 4
It returns the entire number of records in the projects table rather than just the records where proj_Status = 2,3 or 4. I am having the same problem when querying "2 or 3" and basically anything with OR in it. Any ideas?