【发布时间】:2014-12-20 08:10:02
【问题描述】:
我的查询:
$sel = mysql_query("select * from categorydetails where productname LIKE '%$commonsearch%' ");
其中产品名称 = tvs apache rtr:
commonsearch = rtr
但它不起作用
当mysql 列包含多个单词时,有没有办法使用like 命令?
【问题讨论】:
-
您在该搜索结果的那一列中有多少条记录?
-
目前有 10 条记录
-
10 个?因为如果 50% 的记录是搜索词,那么它将被忽略。
-
你只想要 rtr spacific
-
no..总共 10 条记录,但匹配搜索结果的只有一条。