mysql weight based query possible? -


suppose table is like.

 id   name   1  john    2  john walker terry   3  john terry   4  terry 

is possible, in mysql, search through name order number of sub string matches. if search john terry result order should

john terry john walker terry john terry 

you results following. return john or terry in name might want add kind of ranking based on match.

select * yourtable name '%john%' or name '%terry%' 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -