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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -