Hello all,
I have a search tool on my extranet. when someone enters a keyword in the searchbox, the $keyword parameter is taken and SQL-ed.
Now, I want to instead of where table.keyword='$keyword', I want to do where table.keyword LIKE '%$keyword%'.
But when I changed the code, I always got weird results. I am supposed to have 10 results per page, after the change I got 5 results per page with 'some' keywords, not all.
Here is my SQL:
$get_data = mysql_query("SELECT keywords.*, Product.*, Price_Range.* FROM keywords, Price_Range, Product WHERE keywords.keyword = '$keyword' AND keywords.sku = Product.SKU AND Product.Price_Range_ID = Price_Range.Price_Range_ID AND Product.Is_Active=1") or die(mysql_error());
that $keyword, all I did was change it to where keywords.keyword LIKE '%$phrase%'
Did I do the change wrong?
anyone know why I would get odd results counts?
Thanks
MK