Best unofficial Apache Server developers community |
|
This is mysql table.
I want the users who has given answer of all questions and we have predefined set of answers for each question. like Question 1 can have answers from answer1_1, answer1_2, answer1_3 Question 2 can have answers from answer2_1, answer2_2, answer2_3 Initially, I tried query like this:
but then I see the result and realize that 'AND' among all questions won't work for my requirement but I need the result with that logic. Table structure cannot be changed.
posted via StackOverflow
|
|
 
|
You could do something like:
|
|
 
|
If you have a unique key on fields
You could pass num_total_questions as a variable from application |