PHP PDO and MySQL AGAINST() fuction -
mysql version: 5.5.43-0ubuntu0.12.04.1
i have query runs
match(title) against('+:word_1 :word_2' in boolean mode)
i unable honor pdo parameters. have attempted formatting '?
' placeholders no success.
as run plaintext, query runs fine:
match(title) against('+cat hat' in boolean mode)
pdo parameters preferred method of making sure incoming text in database safe, , love have work, if nothing else, consistency.
any recommendations?
match(title) against(? in boolean mode)
then
$stmt->execute([ '+' . $word_1 . ' ' . $word_2 ]);
in other words, concatenate '+'
, $word_1
, , $word_2
, bind entire string.
Comments
Post a Comment