情况如下:
数据库记录举例如下:字段1  字段2
id     class
1      01,02,03,04
2      03,05,09,10
3      05,11,15,17
4      03,04,07,09
5      01,03,04,15例如:
变量
$siteclass="02,03,05";需求效果目的:
检索出class字段内容所有包含有02或03或05的记录,包含有其中一个就可以
难道要把$siteclass的内容拆开来检索3次:
...where class like '%"02"%'
...where class like '%"03"%'
...where class like '%"05"%'
这样吗?这种情况下能不能只用一句就匹配完的方法呢?