mysql模糊查询如何查询两个关键字 我用的like模糊查询,比如mysql的name中有“csdn论坛系统”这几个字,如何在<input>中查询“csdn 系统”也能出来这个“csdn论坛系统”,我现在是查“csdn”或者“系统”都可以。谢谢各位了!不知道我这么表达各位能不能明白! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 name like 'csdn%' or name like '%系统' or name like 'csdn%系统'这样性能很低,但是挑一个你想用的吧! $str = "csdn 系统";$str = str_replace(" ","%",$str);$sql = "select * from table where name like $str"; select * from yourTable where name like '%csdn%' 去掉空格~$str = "csdn 系统"; $str = str_replace(" ","",$str); $sql = "select * from table where name like $str"; 求一个正则 怎样获取验证码图片 php 截取字符串,字符串中只有一个点,截取这个“.”以前的字符串 header('HTTP/1.1 200 OK');为什么在linux下无法使用 php环境下的object 100分,简单问题,PHP包含文件的中文为什么显示出来为乱码,在线等,解决马上揭帖! 安全问题讨论 PHP在UNIX和LINIX平台上,哪个的性能好些?? 请教:哪里可以找到一个功能强大的日期时间计算类? 关于postgreSQL 如何提交表单的时候忽略空格 <a>代替按钮 用链接进行表单的提交
这样性能很低,但是挑一个你想用的吧!
$str = str_replace(" ","%",$str);
$sql = "select * from table where name like $str";
$str = "csdn 系统";
$str = str_replace(" ","",$str);
$sql = "select * from table where name like $str";