I have a problem to find a specific word in my database giving some keywords.
This is my database:
I would like a query wich returns only the word bike from this keywords: wheels pedals chain.
I tried with this code:
SELECT *
FROM mydb
WHERE keywords LIKE '%wheels%' AND keywords LIKE '%pedals%' AND keywords LIKE '%chain%'
but the query doesn't give any result because the keyword "chain" doesn't exist in mydb.
I tried also this other query:
SELECT *
FROM mydb
WHERE keywords LIKE '%wheels%' OR keywords LIKE '%pedals%' OR keywords LIKE '%chain%'
The query returns all the words (car, train, bike).
My scope is to try to guess a word like "bike" by searching words that define the bike, so if I insert a keyword in the search string that is not listed in the db should still come up with the result "bike". For example if I type keywords "wheels" "pedals" and a keyword that is not include in my db like "chain" it should return "bike".