I've got a column of type SET, with possible values of:
My query which uses FIND_IN_SET doesn't find all entries that have one or more of the search criteria:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
Code: Select all
SELECT * FROM Main1 WHERE Category like '%%' AND FIND_IN_SET('%1,4,5,6,11,12,13%', The_Set_Field) > 0 ORDER BY Date_Created DESCI've also tried all of these with the same restrictive results:
Code: Select all
SELECT * FROM Main1 WHERE Category like '%%' AND FIND_IN_SET('1,4,5,6,11,12,13', The_Set_Field) > 0 ORDER BY Date_Created DESC
SELECT * FROM Main1 WHERE Category like '%%' AND (FIND_IN_SET('%1,4,5,6,11,12,13%', The_Set_Field) > 0) ORDER BY Date_Created DESC
SELECT * FROM Main1 WHERE Category like '%%' AND (FIND_IN_SET('1,4,5,6,11,12,13', The_Set_Field) > 0) ORDER BY Date_Created DESC
SELECT * FROM Main1 WHERE Category like '%%' The_Set_Field LIKE '%1,4,5,6,11,12,13%' ORDER BY Date_Created DESC
SELECT * FROM Main1 WHERE Category like '%%' The_Set_Field LIKE '1,4,5,6,11,12,13' ORDER BY Date_Created DESCThanks in advance!