how can i make a search in mysql by multiple words. Let's say i have a title "black handbag for womans". my search string is "handbag womans". I want to display all the products that have handbag and womans in title. I did an sql,it search the products that have handbag and womans but also products that only have handbag or womans, i want just those that have both words.
$stmt = $dbh->prepare("SELECT * FROM Produse
INNER JOIN Categorii on Produse.ID_Categorie=Categorii.ID_Categorie
where MATCH Produse.Prod_Name AGAINST ('$q' IN BOOLEAN MODE) order by Produse.Prod_Name ASC");
$stmt->execute();