My question is, what would be the best way to search a single column in a DB that contains multiple words separated by spaces?
My current SQL statement looks something like this
Code: Select all
$q = mysql_query("Select * from tbl_restaurantinfo Where txtsearch Like '%". $txtsearch. "%' Order By name");Is there a better way to go about this?
Right now I'm getting way to many results when I search.
For example, if I search for the word Deli I will receive 25 different rows and only 3 of those rows actually have the word Deli in them. It's almost like it's searching for each individual character and not the entire word.
Any help would be appreciated.