[英]MATCH AGAINST not working with two LEFT JOIN: #1210 - Incorrect arguments to MATCH
I have three tables in my MySQL database: books
, authors
and cities
. 我的MySQL数据库中有三个表: books
, authors
和cities
。
books
has the columns: id
, author_id
books
具有以下列: id
, author_id
authors
has the columns: id
, author
, city_id
authors
具有以下列: id
, author
, city_id
cities
has the columns: id
, city
cities
有列: id
, city
Running 跑步
SELECT *, books.id, authors.author FROM books LEFT JOIN authors ON books.author_id = authors.id WHERE MATCH (authors.author) AGAINST ("peter" IN BOOLEAN MODE);
via SQL tab in phpMyAdmin everything works fine. 通过phpMyAdmin中的SQL选项卡,一切正常。
But taking another LEFT JOIN
like 但考虑另一个LEFT JOIN
像
SELECT *, books.id, authors.author, cities.city FROM books LEFT JOIN authors ON books.author_id = authors.id LEFT JOIN cities ON authors.city_id = cities.id WHERE MATCH (authors.author, cities.city) AGAINST ("peter" IN BOOLEAN MODE);
I'm getting the error message 我收到错误消息
MySQL said: Documentation MySQL说:文档
#1210 - Incorrect arguments to MATCH #1210-匹配参数不正确
I made many tests and it seems like MATCH AGAINST
doesn't work with two LEFT JOIN
. 我做了很多测试,好像MATCH AGAINST
不能和两个LEFT JOIN
。 But I couldn't find anything in the internet. 但是我在互联网上找不到任何东西。 I also tried to use JOIN
instead of LEFT JOIN
but without success. 我也尝试使用JOIN
代替LEFT JOIN
但是没有成功。
All columns definitely exist. 所有列肯定存在。
Any idea what I can do? 知道我能做什么吗?
If any more information needed, just ask. 如果需要更多信息,请询问。
我找到了解决方案:列cities
是InnoDB
而不是MyISAM
就像其他表格一样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.