[MySQL] Simple, but I don't know

I have a field that can be “1”, “2”, “3” or any of the three separated by a space. i.e. “1 2” or maybe “1 2 3” etc. Also, the numbers are not depended of eachother: “2 3” is possible.

I want to put all entries with a 1 (either “1” or “1 2 3” etc…) to be put into one variable, and the same with both 2, and 3. What is the SQL I should use?


$sql = "SELECT * FROM mytable WHERE myfield='1'";

This is simple enough when there is only a “1” in the field, but how can I know if the field contains a 1 even when there are other values within it.

Thanks.