I have a table member1 which looks like this. I am editing my table why I want to return all values from pst.
id club_id mobile pst
1 1 9437054788 6
2 1 9437345602 NULL
3 2 9437056738 35
4 2 9437064876 39
5 1 9437059927 NULL
6 2 9437965276 40
7 1 9437121455 NULL
I have a drop-down fields one for club_id and another check-box field for pst with a value of 'select All' on both fields. 'select All' equals '%'.
The solution provided by @TheConstructor works well in this query
SELECT group_concat(mobile) FROM `member1` WHERE COALESCE(pst, '')
LIKE '%' and club_id=1
or
SELECT group_concat(mobile) FROM `member1` WHERE COALESCE(pst, '')
LIKE '6' and club_id=1
Now I want to have multiple values in the query in place of '6' for example
SELECT group_concat(mobile) FROM `member1` WHERE COALESCE(pst, '')
in (6,35,39,40) or in ('%') and club_id=1
How I can achieve that, as at the moment I can return the result with just one value i.e. 6 or 35 or 39 or 40
NULLto match one of those four values?