在我的本地MySQL数据库中,这个查询搜索一个特定的单词"samy"给了我由两个结果组成的正确数据:
SELECT *
FROM members
LEFT JOIN member_details
ON members.id_members = member_details.id_member
LEFT JOIN company_details
ON members.id_members = company_details.id_member
WHERE MATCH(name, lastname, email, phone, adress,
website, company_name, company_phone_01,
company_phone_02, company_fax, company_email,
company_description, company_adress, company_website)
AGAINST("samy*" IN BOOLEAN MODE)
但是当我在服务器的mysql数据库上运行相同的请求时,它返回所有成员数据。但是,当我这样做时,它确实工作:
WHERE MATCH(name, lastname, email, phone, adress, website)
AGAINST("samy*" IN BOOLEAN MODE)
怎么了?
猜测:本地数据库是MyISAM,生产数据库是InnoDB(不支持MATCH AGAINST要求的全文搜索)