MySQL: Question about SELECT WHERE AND/OR
Posted
by Andrew
on Stack Overflow
See other posts from Stack Overflow
or by Andrew
Published on 2010-05-10T17:29:26Z
Indexed on
2010/05/10
17:34 UTC
Read the original article
Hit count: 221
I'm trying to write a query that returns the same result from three different events, but I think I am doing it wrong. I can run my query against one event ID and it works. How can I select all three? Here's what I have so far:
SELECT * FROM `Registrations`
WHERE `Role` = "Attendee" AND `RegistrationStatus_ID` = "1" AND `DigSignature` IS NULL
AND `Event_ID` = "147" OR `Event_ID` = "155" OR `Event_ID` = "160"
© Stack Overflow or respective owner