In my Database i have a field with a comma separated list of ids (itemids).
For an example i fill some rows with test data:
Row | itemids
1 => 2,5,8,11,22,45
2 => 4,6,9,13
3 => 1,3,5,16,23
4 => 6,12,18,21,24
Now i have a search string which contains all ids i want to serch for:
searchstring => 4,23,40
What i want to do now is to get all rows from the database which contains one or more values from my search string. From my example i should get the following rows:
Row | itemids
2 => 4,6,9,13
3 => 1,3,5,16,23
How do i do this? Can you give me an example SQL Query?
Thanks for help!