Hey guys, hope the collective can help me..
In English, it gets the classes that correspond to a users wrong answers (think placement exam)
Here's my query: (written for php)
SELECT Response.Ques_ID, Response.Ans_ID, Answers.Ans_ID, Answers.Class_ID, Answers.Bool_Val, Class.Class_ID, Class.Class_Name
FROM Response INNER JOIN Answers ON Response.Ans_ID=Answers.Ans_ID INNER JOIN Class ON Answers.Class_ID=Class.Class_ID
WHERE Assess_ID=$assessID AND Bool_Val=0 ORDER BY Response.Ques_ID ASC", $connection);
Which gives me exactly what I'm asking for:
1: Class # 1
2: Class # 2
6: Class # 2
8: Class # 1
11: Class # 3
12: Class # 1
But all I really need is one instance of each (for example, only show Class 1 and Class 2 once). I've thrown in DISTINCT a few places to no avail, and unfortunately that's about the extent of my abilities (or at least I've hit a roadblock)
Any ideas??
Thanks in advance