Hello
As you can probably see from the way I have written the title for this thread, I am new at this. And hopefully I have a simple problem with a simple enough solution.
I have a working code with category pages being generated with different search strings, for example, the 'baby' category page code has a query run with the keyword as "baby", and results in all baby products.
This is the part of my code that is relevant:
if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page=1; };
$var = "baby";
$trimmed = trim($var); //trim whitespace from the stored variable
//Query from database
$query = "SELECT * FROM Test_Travel WHERE MATCH (name,keywords,description) AGAINST ('%$trimmed%') ORDER BY price";
My problem is I dont know what syntax to use for boolean search, I mean , if my query uses AGAINST('+baby +bib'), I dont understand how to assign this value to $var in the php code. Simply $var = "+baby +bib" doesnt work because this is treated as baby OR bib, and I want it to be treated as baby AND bib. Please help me with the correct syntax for assigning this value to $var. I have been unable to find it on the internet. Thanks!