Hi all,
I\'m in the process of converting phpSurvey to MySQL, and I\'m nearly finished now. My main problem is subselects, or rather, how to replace them. Here\'s a query that I have to fix:
SELECT * FROM respondent WHERE respondentID NOT IN (SELECT respondentID FROM assign WHERE surveyID = $surveyID) - with $surveyID being a variable.
After consulting the MySQL manual and phpFreaks, here\'s my first guess at a replacement query:
SELECT respondent.* FROM respondent LEFT JOIN assign ON respondent.respondentID = assign.respondentID WHERE assign.surveyID = $surveyID AND assign.respondentID IS NULL
However, the where clause is impossible. If anyone has any suggestions, please let me know.