What's the correct way to format a parameter for string comparison (i.e. a like statement in MySQL)?
My query looks like this:
select *
from a_database
where cost between 'min_price' and 'max_price'
and (title like '%keywords%'
or description like '%keywords%'
or caption like '%keywords%')
;
and doesn't work. However, this version of it works:
select *
from a_database
where cost between 'min_price' and 'max_price';
I tried a few variations of this, like :keywords, :?keywords, and messing around with {} and ', but I haven't hit pay dirt yet.
Thanks!
Update -- I also tried REGEXP instead of LIKE to no avail...