Hi,
I seem to be having a brain block on a concept problem. I'm running a query and I don't think I quite understand how ANDs and ORs work in relation to eachother.
Here's the query:
SELECT * FROM church_info church, service_times service WHERE church.attendance='3' AND church.loc_id='9' AND church.ID='1'OR church.ID='2'OR church.ID='3'OR church.ID='4'OR church.ID='9'OR church.ID='10'
I want it to select where attendance = 3, location = 9, and ID = 1
Or
where attendance =3, location = 9, and ID =2
But once it gets to the ORs it selects everyone where ID = 1, or 2, or 3 etc.
Am I making sense?
Any insight would be great!!
Thanks!
Lisa