+----+-------+-------------+
| id | ids | other_data |
+----+-------+------------+
| 1 | 1,2,3 | some data |
| 2 | 1,2 | some data |
| 3 | 2 | some data |
| 4 | 6 | some data |
+----+-------+------------+
following command retrieves first and second row and first argument for find_in_set is an integer :
SELECT * FROM my_table WHERE FIND_IN_SET(1,ids);
What if I want to send multiple ids as first argument? for example something like:
SELECT * FROM my_table WHERE FIND_IN_SET('1,2',ids);
I need to retrieve rows containing 1 or 2 in their ids list.