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 this:
select * from Table_One where Table_One.groupid like '%".$objectData[groupid]."%'
so if the value of $objectData[groupid] is 5, then the result should be
1 AAA 5,6 2 BBB 5,7
Similarly, if the value of $objectData[groupid] is 6, then the result should be
1 AAA 5,6
and if the value of $objectData[groupid] is 7, then the result should be
2 BBB 5,7
source share