| 插件 | 建站系统 V3.26 |
| 应用作者 | 迅睿官方团队 |
| 发布时间 | 2022-03-01 15:30:06 |
| 更新时间 | 2025-10-09 09:03:09 |
$result = \Phpcmf\Service::M()->db->table('1_news')
->whereNotIn('id', $blockedIds) // 使用$blockedIds数组排除指定的id
->get()
->getResultArray();如何使用$blockedIds数组排除指定的id?
是whereNotIn吗
->whereNotIn('id', $blockedIds)
->where('id not in ('.(is_array($blockedIds) ? implode(',', $blockedIds) : 0) .')if(is_array($tiddata)){ $tid =$tid; } else { $tid =0; }->whereNotIn('id', $tid)