MYSQL KEYWORD MATCH query on two columns from different tables?
Posted on 2011-10-26
Is it possible to perform a MATCH keyword search on a column from one table with another column from a second table (these two tables are joined on an ID).
PK - an_ID
FK - an_ID
Both Title and Content are TEXT fields.
Both have had a FULLTEXT search added to their respective table.
Is there one query which will search the 'Title' and/or the 'Content' for a Match against a keyword search?
I have tried:
SELECT *, MATCH( title, content ) AGAINST('keyword%') AS score FROM Table_A t1 INNER JOIN Table_B t2 ON t1.an_ID = t2.an_ID WHERE MATCH( title, content ) AGAINST('keyword%')
I get incorrect arguments to MATCH :(
Hope that is clear?