dears,
i want to select all the the records in the table as the below:
if the search string is "i went to the supermarket yesterday with a friend"
i want to discard these words "i, to, the, with, a" so the remain words are "went supermarket yesterday friend" so i search in the table for the follows:
1-first select * from mytable where title = 'i went to the supermarket yesterday with a friend' the whole string,
2-select any title contains two or more words in the string "went supermarket yesterday friend"
regardless the order of the word
3- at the end select any record contains any word in "went supermarket yesterday friend"
example:
i have three rows in mytable:
1-"i bough a supermarket"
2-"meet your friend in the supermarket"
3-"i went to the supermarket yesterday with a friend"
4-"John went to the supermarket"
the result of the selection must be :
in first row
"i went to the supermarket yesterday with a friend" (exactly same)
in the second or third row (contains 2 words: went, supermarket)
"John went to the supermarket"
in the second or third row
"meet your friend in the supermarket" (contains 2 words: friend, supermarket even if in different order)
in the last row
"i bough a supermarket" (contains 1 word: supermarket )
as a result i need an advanced search engine but i don't want to use temp table because i thing it will make troubles when many users are searching at the same time
thanks on advanced