The solution is probably related to these posts, but my problem is slightly different:
http://www.phpfreaks.com/forums/index.php/topic,113742.0.html
http://www.phpfreaks.com/forums/index.php/topic,214586.0.html
QUESTION
id name
1 Who is...
2. What is...
QUEST-FORM
id form_id quest_id
1 1 1
2 2 2
How do I find the question NOT linked to form 1, which is question 2?
Here are the queries I have tried without success?
SELECT question.id, question.name FROM question, quest-form WHERE quest-form.form_id=1 AND question.id!=quest-form.quest_id
SELECT question.id, question.name FROM question LEFT JOIN quest-form ON question.id=quest-form.quest_id WHERE quest-form.quest_id IS NULL AND quest-form.form_id=1
select question.id, question.name from question left join quest-form using (quest-form.quest_id) where quest-form.form_id=1 AND quest-form.quest_id IS NULL
MySQL client version: 4.1.22
THANK YOU!