My query:
SELECT MAX(num)
FROM (SELECT nomInteretUser,idUser,COUNT(nomInteretUser) as num
FROM userInteret
WHERE nomInteretUser IN ('piano','flute','chien') GROUP BY idUser
)
The goal is to change the IN ('piano','flute','chien')
to a dynamique array
like
SELECT nomInteretUser, idUser, COUNT(nomInteretUser) as num
FROM userInteret
WHERE nomInteretUser IN ($array)
GROUP BY idUser
NB: $array is an array houw contain the list of interet