Answer the question
In order to leave comments, you need to log in
How to use to_tsquery (postgres) with PDO?
Hello!
Writing:
$STM = $PDO->prepare('SELECT title FROM zz_ad.advs WHERE (to_tsvector(\'russian\',title) @@ to_tsquery(\'russian\', :str))');
$STM->execute(['str' => 'Привет!']);
$STM->fetchAll();
Syntax error: 7 ERROR: syntax error in tsquery: "Hi!"
Answer the question
In order to leave comments, you need to log in
or
SELECT title
FROM table
WHERE title_tsv @@ to_tsquery('zend') and
title_tsv @@ to_tsquery('fram:*')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question