I didn't found a solution for my problem.
Here's a example:
A have a Table, for example: Person
. And it has a column that contains alot number separated by ",". These numbers represent things, but it isn't relevant right now.
Table Person
:
nm_name: Jonas
nm_email: jonas@example.com
ds_numbers: 1,2,3,5,17,27,67,77,
I want to make a query that filter the searchs in table person by this column ds_numbers
. But the user will select witch numbers will by the filter, for example, if user select at least 1 number that is in this column, the register will come.
If I select, for example, "3" this register will come, or "3,55,12" will come too, because at least 1 value need to be in string.
The problem it, I can't use Like '%4%' because I would return 4, 41, 74... Any different solutions?
Important: I mount this query in Java, so I can use Java features, like Loops, but I didn't found a solution. Any ideas?
And I'm using MySQL.