Closed kmvan closed 3 years ago
Escape function only escapes a value into a sql value. You need to escape the various characters used in LIKE if you don't want them to be special just like with REGEXP.
If the search word includes ?
question mark...
I'm not sure what your comment means. The LIKE statement does not assign any special meaning to a question mark, only percent signs and underscores.
Expected output
// SELECT * FROM
tableWHERE
contentLIKE '%word\%'
Actual output
// SELECT * FROM
tableWHERE
contentLIKE '%\'word%\''
Any idea?