I have a table:
id name position status
1 A 1,2 1
2 B 1 1
3 C 1
4 D 2 1
Where: position
column is a text field;
My request is here:
SELECT `id`
FROM `table`
WHERE `status`=1
AND `position` > ''
AND `position` = FIND_IN_SET( 1, `position` )
OR `position` = FIND_IN_SET( 2, `position` )
This request will return: 1,2,3,4. This is a wrong as I need: 1,2,4 ->
Condition: (position
> '').
Where is a problem and how to change my request?
Thanks.