Below are the queries I am executing. But for some reason $MachineQuery is not getting a result. I assume it has something to do with using $q1 in the query but I don't know why. Any Ideas?
$q1 =mysql_query("SELECT DISTINCT SymptomID
FROM Tree
WHERE SymptomID NOT IN (SELECT DISTINCT SymptomID
FROM Tree
WHERE LBNodeID = 0 OR RBNodeID = 0)")
$MachineQuery = mysql_query("SELECT DISTINCT M.MachineID, M.MachineName
FROM Machines M, Systems Sys, Symptoms Sym
WHERE M.MachineID = Sys.MachineID AND Sys.SystemID
=Sym.SystemID AND Sym.SymptomID IN ($q1)