Reputation: 161
I need to create a powerful search page for my website, I am using php & mysql.
I want to
get results with partial match. Eg, if I have stackoverflow in db but i have searched stacke so that should show up in the results.
I know about LIKE. I want to build a search like google which does take similar type words and searches that too.
get results by matching every word in the search string separately.
Upvotes: 1
Views: 4931
Reputation: 186
I don't know about "stacke" since that's not a substring of "stackoverflow". Maybe you meant "stacko"? In that case your query would be like
SELECT stuff FROM table WHERE field LIKE "stacko%";
Upvotes: 5