I have this query in my PHP code:
select * from book where title ~* '\mkeyword'; /* \m matches only at the beginning of a word */
keyword is user input. How can I rewrite the query to use binding variables? When I do this:
select * from book where title ~* :keyword;
and then:
$stmt->bindValue('keyword', "\m".$keyword);
after prepare statement, I get \\m in the query and the query won't work the way I want.