I'm trying to run a full text search on two tables. One is a table populated with books, the other with cards. The term I'm using to search in the code below matches one record in the books table. When I run the first block of code, which queries just the books table, the correct record is returned. However, when I modify the query to include the cards table as well, mysql throws an error stating there are incorrent arguments for the MATCH clause (#1210 - Incorrect arguments to MATCH). Have I constructed this query incorrectly?
This query works:
SELECT Title, AuthorIllustrator, Form,
MATCH(Title, AuthorIllustrator, ISBN10, ISBN13)
AGAINST ('Amadito')
AS score
FROM books
WHERE MATCH(Title, AuthorIllustrator, ISBN10, ISBN13)
AGAINST ('Amadito')
This query does not work:
SELECT books.Title, books.AuthorIllustrator, books.Form, cards.Title, cards.Artist, cards.CardNumber,
MATCH(books.Title, books.AuthorIllustrator, books.ISBN10, books.ISBN13, cards.Title, cards.Artist, cards.CardNumber)
AGAINST ('Amadito')
AS score
FROM books,cards
WHERE MATCH(books.Title, books.AuthorIllustrator, books.ISBN10, books.ISBN13, cards.Title, cards.Artist, cards.CardNumber)
AGAINST ('Amadito')