题:想要查询出来所有逗号分隔的值为1的结果。 经分析,考虑前、中、后三种带1的情况以及只有一个1的情况即可。 查询sql: select * from user a where a.`password` like '1,%' or a.`password` like '%,1,%' or a.`pa ...
分类:
其他好文 时间:
2018-10-23 12:05:39
阅读次数:
153
$newWhere=‘FIND_IN_SET("468",b.fangCharachteristic)‘;Yii2多个关键字查询$kw=explode(‘,‘,$data[‘keyword‘]);foreach($kwas$k=>$v){if($k==0){$wheres[]=‘or‘;$wheres[]=‘FIND_IN_SET(:id‘.$k.‘,keyword)‘;}else{$wheres[]=‘FIND_IN_SET(:id‘.$k.‘,keyword)‘;}$wheress[‘..
分类:
其他好文 时间:
2017-10-25 23:36:36
阅读次数:
126