开发者

how to search permutated word or number in database

I have create a search form that can search the data from my database and show the result. Now I have try to create a search form that can search the permutated words.

Example, I have a textfield in the form for keyin the keyword to search. What to do if I want to search "tea" but the results returned from 开发者_如何学JAVAthe database not only "tea" but also "tae", "eat", "ate", "eta", and "aet".

I know how to generate the list of permutated word of tea but I don't know how to search tea but the script will auto search the permutated words also.

Can I use wildcard for this? I have think that generate the permutated words first and then search with the permutated words that list out. But it is not work.

Any idea or help is appreciated.

Thanks


Generate all permutation resutls and send list to database and query using IN clause for each list item.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜