我的搜索区分大小写,但我希望它不区分大小写.在MySQL中,我将我的数据库和表设置为utf8_general_ci.搜索仍然区分大小写.我一直在做一些研究,似乎背后的原因是我的查询中的BOOLEAN模式.有没有办法让它不区分大小写?所以无论我如何用任何灵敏度输入任何单词,它总会在搜索结果中显示出来?
SELECT
s_cost_sheet.partnumber,
s_cost_sheet.description,
s_cost_sheet.price,
s_cost_sheet.notes
FROM s_cost_sheet
WHERE MATCH ( partnumber, description, price, notes )
AGAINST('%".$search."%' IN BOOLEAN MODE) ORDER BY partnumber, description, price, notes ASC";
Run Code Online (Sandbox Code Playgroud)
我已经在phpMyAdmin中测试了搜索,无论字板的类型如何,它都可以工作,它可以是Plate,PLATE,plaTE.一切正常,所以它必须是导致问题的内容.