R Robert9 Well-known member Aug 21, 2020 #1 sv_prefix_ids could be 18 or 18,181,189 I want to search for threads with prefix_id == 18 Can i search for LIKE 18 OR LIKE 18,% OR LIKE %,18,% OR LIKE %,18 is this correct?
sv_prefix_ids could be 18 or 18,181,189 I want to search for threads with prefix_id == 18 Can i search for LIKE 18 OR LIKE 18,% OR LIKE %,18,% OR LIKE %,18 is this correct?
Mouth Well-known member Aug 21, 2020 #2 Robert9 said: is this correct? Click to expand... LIKE '%18%'
L Lawrence Well-known member Aug 21, 2020 #3 If you are using a finder, which you should be, then: PHP: $columnName = $finder->columnSqlName('the_column_containg_the_values'); $prefixId = 18; 'FIND_IN_SET(' . $finder->quote($prefixId) . ', '. $columnName . ')'
If you are using a finder, which you should be, then: PHP: $columnName = $finder->columnSqlName('the_column_containg_the_values'); $prefixId = 18; 'FIND_IN_SET(' . $finder->quote($prefixId) . ', '. $columnName . ')'
R Robert9 Well-known member Aug 21, 2020 #4 I dont use xf to work here. LIKE '%18%' is not correct, because it can find also 118,22,23 It is like written, i have to check the cases
I dont use xf to work here. LIKE '%18%' is not correct, because it can find also 118,22,23 It is like written, i have to check the cases