I'm trying to match a few things here and I'm getting a little confused - any help would be appreciated:
$s = "SELECT DISTINCT DEVID, INPUTDEVID, MACHINE FROM EVENTS WHERE (EVENT_TIME_UTC BETWEEN '".$start."' AND '".$end."') AND ((EVENTTYPE = 0 AND EVENTID = 0) OR (EVENTTYPE = 4 AND EVENTID IN (2,8,10,53,413,431))) AND (MACHINE = ".$machine.")";
So I'm trying to find any event that has an eventtype of 0 AND an eventid of 0... OR any eventtype of 4 and eventid in (2,8,10,53,413,431). I do NOT want an eventtype of 4 and an eventid of 0. I'm getting a bit confused on how to convey this in the sql statement. I thought I could separate it with parentheses and that would do the trick, but I'm not so sure
Any suggestions?