私はRuby on Railsの初心者です。テキストボックスを検索してから、アポトラフィ( ')eg testing'という単語を入力するたびに.....私は常にエラーを受け取りました:
Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's word%' OR english_name LIKE '%testing's word%' OR chinese_name LIKE '%testin' at line 1: SELECT COUNT(DISTINCT `jos_store`.`id`) FROM `jos_store` LEFT OUTER JOIN (SELECT id as store_replenishment, store, MAX(stock_movement) AS stock_movement FROM jos_store_replenishment GROUP BY store) AS replenishment ON replenishment.store = jos_store.id LEFT OUTER JOIN jos_stock_movement ON jos_stock_movement.id = replenishment.stock_movement WHERE (store_id LIKE '%testing's word%' OR english_name LIKE '%testing's word%' OR chinese_name LIKE '%testing's word%')
私の問題を手伝ってくれませんか。