我需要使用搜索关键词'galaxysduos'搜索'Galaxy S Duos'这样的单词。请在PHP Mysql Query中为我提供解决方案。
答案 0 :(得分:2)
SELECT * FROM yourTable WHERE REPLACE(fieldname," ","")="galaxysduos"
答案 1 :(得分:0)
试试这个添加@Hanky回答的一些修改
SELECT * FROM `yout_table` WHERE LOWER(REPLACE(`your_field`," ",""))="galaxysduos"
OR
SELECT * FROM `yout_table` WHERE REPLACE(LOWER(`your_field`)," ","")="galaxysduos"