I'm going crazy on this hope someone can help me out....
I have one Table:
user_skils:
ID | UID | SKILL
1 23 House
2 5 Disco
3 8 Punk
... ... ...
... ... ...
... ... ...
Now Im building a search query where the user can search and filter out people that don't match the criteria:
Example Search: Disco, Punk, House
Meaning that I only want the users that match this 3 criterias ( have House AND Disco AND PUNK)... How can I manage this via a query?
Something like
SELECT count(uid) as matches ,
GROUP_CONCAT(skill) as skills_grouped
FROM user_skilks
WHERE skill LIKE %Disco%
AND skill LIKE %punk%
AND skill LIKE %house%
Should give me something like:
Matches | skills_grouped
3 House,Punk,Disco
Meaning that 3 people match this criteria...