This is my first time using the full text search feature in MySQL.
I am using PDO statements and a select * statement.
SELECT *
FROM `table`
WHERE MATCH (var1) AGAINST (:field1 IN BOOLEAN MODE)
AND MATCH (var2) AGAINST (:field2 IN BOOLEAN MODE)
If var1 or var2 are undefined, what variable can I set them to so that all results from field1 or field2 are displayed? Currently I get no results.
Before using Full Text search I would use
if (!isset($var1)) {
$var1 = '%' . '' . '%';
}
with a LIKE statement that would return all results when a user has not specified any selection, etc.
I have tried using * but this doesn't work either.
Thanks