I have tried the following two statements:
SELECT col FROM db.tbl WHERE col (LIKE 'str1' OR LIKE 'str2') AND col2 = num
results in a syntax errorSELECT col FROM db.tbl WHERE page LIKE ('str1' OR 'str2') AND col2 = num
results in “Truncated incorrect DOUBLE value: str1” and “Truncated incorrect DOUBLE value: str2” for what looks like every result. However, no results are actually returned.
I figured one of the two statements would work, but they aren’t.
Advertisement
Answer
SELECT col FROM db.tbl WHERE (col LIKE 'str1' OR col LIKE 'str2') AND col2 = num