Forum Moderators: open
I am trying to query a dictionary database for partial matches regardless of the position of the word(s) searched.
Let us assume that there are multiple entries for the word "bird" like:
entry 1: "a babe in arms"
Entry 2: "a babe in the woods"
Now, when I use LIKE, and the user enters "babe," no matches found, since the query does not start with "b"
What I trying to achieve:
When I search "bird", all strings containing the term bird should be displayed (in our example, 2 results).
Or when I search "woods" entry 2 should be displayed.
How can I accomplish this with MYSQL (php)?
Please note that I am a nevbie.
Thank you in advance.
[dev.mysql.com...]
See the part about sorting rows in decreasing order of relevance - I use that little query structure regularly and it works pretty well for me.
Nevertheless, I will try FULLTEXT and post the results here.
Thank you again.
[edited by: trillianjedi at 11:46 am (utc) on May 3, 2006]
[edit reason] Fixing word-trapped typo ;) [/edit]