I have two mysql tables search_words(id,word) and search_text_data(id,text) I need to find the count of words from search_words which appear in the text rows in search_text_data For eg. if the word in search_words is "family", then i want to find the count of how many times the word appeared in the text field in search_text_data
select a.id, a.word, count(b.id)
from search_words a , search_text_data b
where b.text like "%a.word%"
I know the above query is not the right syntax Need mysql query syntax that would do this.