Why does this SQL query give correct results on my local database, but wrong result on the server database?

181 Views Asked by At

On my local MySQL database, this query to search for a specific word "samy" gives me the correct data consisting of two 2 results:

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)

But when I run the same request on the server's mysql database, it returns all of the members data. It does however work when I do this:

WHERE MATCH(name, lastname, email, phone, adress, website) 
AGAINST("samy*" IN BOOLEAN MODE)

What is going wrong?

1

There are 1 best solutions below

1
On

Guess: LocalDB is MyISAM, Production DB is InnoDB (which does not support full-text searches required by MATCH AGAINST)