greetings!
I'm trying to make a search box for my hotel search site using the mysql fulltext search facility.
when someone types in, say, "tennis golf" (without the quotation marks) i'd like it to bring up a list of hotels which offer BOTH tennis AND golf facilities.
when i query my database with the following it works perfectly:
SELECT Hotel_Id FROM hotel WHERE MATCH (Town,DescriptionEnglish) AGAINST ('+tennis +golf' IN BOOLEAN MODE)
However, when i try to translate this to PHP i'm having problems. Can anyone tell me where i'm going wrong with this?
$query = "SELECT Hotel_Id FROM hotel WHERE MATCH (Town,DescriptionEnglish) AGAINST ('+(" . ($_POST['keywords']) . ")' IN BOOLEAN MODE)";
I just can't seem to get the + symbol to apply to everything that appears inside the brackets.
Any ideas would be much appreciated!
Cheers!
LizzyD