时间:2020-11-07 21:59:15 | 栏目:PHP代码 | 点击:次
或者叫,分词检索数据库
$res = mysql_query("select * from peter where id like '%中草药%' and '%6%'"); //这样写是报错的;
$res = mysql_query("select * from peter where id like '%中草药%' or '%6%'"); //而这样写是正确的;奇怪~
$res = mysql_query("select * from peter where id like '%中草药%' and id like '%6%'"); //这样写是正确的;
$res = mysql_query("select * from peter where id like '%中草药%' or id like '%6%'"); //这样写都是正确的;