多关键模糊查询,只需要改两处:
$val='username like "%'.str_replace(' ','%" or username like "%',$keywords).'%"';
$sql="select * from fuzzyuser where {$val}";
高亮也不用重写
$val='username like "%'.str_replace(' ','%" or username like "%',$keywords).'%"';
$sql="select * from fuzzyuser where {$val}";
高亮也不用重写
2015-06-26
多关键字的模糊查询:
$val='username like %'.str_replace(' ','%, or username like %',$val).'%';
select * from user where username like {$val}';
$val='username like %'.str_replace(' ','%, or username like %',$val).'%';
select * from user where username like {$val}';
2015-06-05