0

I'm just learning about full text search in MySQL and trying to implement it into a website thats currently using the MYSQL LIKE command.

It works really well except when someone types something like McDonald's

The apostrophe causes:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's' IN BOOLEAN MODE)

Here is the code I'm using:

AND
        MATCH(client.clientName, client.clientDesc, offer.offerSaving, offer.offerDesc) AGAINST(+'$keyword' IN BOOLEAN MODE)    
        GROUP BY offer.idoffer ORDER BY distance ASC, offer.offerScore DESC

The McDonald's is saved in the database as McDonald's however it would be good if it could come back with with McDonald's if they type it with the apostrophe or without. Is this possible too?

Dharman
  • 21,838
  • 18
  • 57
  • 107
Daniel Robinson
  • 635
  • 1
  • 9
  • 23

0 Answers0