MySQL Forums
Forum List  »  Full-Text Search

MATCH AGAINST on two tables
Posted by: szymon roch
Date: September 16, 2009 09:25AM

Assume You have two tables

table "a" with one column "aname"

values:

John
Peter
Michael

table "b" with one column "bname"

values:
Joh
Ter
Chael

Is it possible to, wiht one query, using MATCH AGAINST get such result. I assume that the score field is a result of:
SELECT MATCH(bname) AGAINST(' value of aname')as SCORE from b

RESULT I'd like to get (score values are fake in this example):

aname;bname;score
John;Joh;75
John;Ter;67
John;Chael;50
Peter;Joh;45
Peter;Ter;78
Peter;Chael;35
Michael;Joh;34
Michae;Ter;43
Michael;Chael;78

For now the only solution I see is writing a PHP or whatever script, selecting all a records, than looping through result and for each result querying b table.

Thanks in advance for any advice

Options: ReplyQuote


Subject
Views
Written By
Posted
MATCH AGAINST on two tables
10533
September 16, 2009 09:25AM
4165
October 23, 2009 01:00AM
3772
November 29, 2009 04:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.