My Table:
pno name lesson
-----------------------------
1 John Math
1 John Biology
2 Lisa Biology
3 Emma Math
3 Emma Art
3 Emma Pyhsic
You can think lesson like 'checkbox', when user checked the lesson, it will filter my table. Problem is here that I want to filter Only taking BOTH Math AND Biology!
When user checked only Math;
My Filtered Table:
pno name lesson
-----------------------------
1 John Math
3 Emma Math
When user checked Both Math and Biology;
My Filtered Table:
pno name lesson
-----------------------------
1 John Math
1 John Biology
My HTML Design is http://jsbin.com/adarih/2/
When user checked Both Math and Biology, i marked lime color. so Lisa have Biology but not Math. I'm not taking Lisa. Emma takes Math, but doesn't take Biology. I'm not taking Emma.
Actually it seem so easy. But it is crucial sql query for me...