mysql[fulltext search]- show search term used to get that particular result -


for like search do-

select name,"term1" searchterm articles name "%term1%" union select name,"term2" searchterm articles name "%term2%"` 

how term used particular result in or search fulltext search? there way -

select name,searchterm articles match (name)  against ('term1 term2' in boolean mode); 

try (it tested on local , working):

select     tmp1.msg,     tmp2.tag_name (     select          convert(name using utf8) msg               `articles`               match(`name`) against ('term1 term2' in boolean mode) ) tmp1 inner join (     select convert('term1' using utf8) tag_name     union     select convert('term2' using utf8) tag_name       ) tmp2     on tmp1.msg concat('%',tmp2.tag_name,'%') 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -