I try to realize search from album where I set artist in form. I get variable from form and I make query. Successfully I get variable from the form.
$words = $_REQUEST['SQLfield'];
$tempquery = "SELECT * FROM album WHERE to_tsvector(artist) @@ to_tsquery('$words')";
do_sql($tempquery);
When I search for example Jimi Hendrix the result is:
query #1: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error in tsquery: "Jimi Hendrix "