I have a table, named group
, in mysql. One of its field is member_ids
where values are like (2,3,4,5).
I want to use 2,4,5 excluding 3 in one place and 3 excluding others in another.
I am using mysql as a database for PHP. Any idea how to do it with mysql query or php code?
member_ids: (2,3,4), (2,3,4,5), (1,3,5,7) ...
There are multiple values in single cell.
Now I want to use all values of 2nd cell except 3 i.e. (2,4,5) to find email_id
from another table member
.
I can only use '3' in the query, not the rest i.e. (2,4,5).
I need to find email id of 'id'= 2, 4 and 5 from member
table.