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
Post a Comment