I am trying to make a search form with php, using the following query :
$this->images('`description`="'.db::escape($mysearch).'"');
It's working great, BUT it returns only the EXACT description that corresponds to $mysearch ! I would like that it returns all the descriptions that contains the keywords (1, 2 or 3) from the $mysearch field. What is the exact SQL query ? I tried with :
'MATCH `description` AGAINST "'.db::escape($mysearch).'"'
But I get an error back:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MATCH
title
AGAINST "mykeyword"' at line 1
The solution was :
'MATCH(title) AGAINST ("'.db::escape($keyword).'" IN BOOLEAN MODE)'