Table_One
id name groupid
1 AAA 5,6
2 BBB 5,7
3 CCC 15
I am trying to make a query something like:
select * from Table_One
where Table_One.groupid like '%".$objectData[groupid]."%'
such that if value of $objectData[groupid] is 5 then result should be
1 AAA 5,6
2 BBB 5,7
Similarly, if value of $objectData[groupid] is 6 then result should be
1 AAA 5,6
and, if value of $objectData[groupid] is 7 then result should be
2 BBB 5,7