$filter = ['and',
['=', 'is_del', 0],
['like', 'title', $where['title'] ?? ''],
['=', 'status', $where['status'] ?? ''],
['or',
['like', 'desc', $where['key'] ?? ''],
['like', 'content', $where['key'] ?? ''],
]
];
$tmp = ['or'];
// 子级栏目
foreach ($where['sub_column_id'] as $v) {
array_push($tmp, ['>', 'FIND_IN_SET('.$v.', column_id)', 0]);
}
array_push($filter, $tmp);
$data = modelClass::find()->andFilterWhere($filter)->asArray()->all();
10-24
2818
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)