$array = $fields -> exports;
$values = implode(",", $array);
$export = Users_logs::find()
-> where(['IN', 'Id', [$values]])
-> all();
答案 0 :(得分:1)
不要使用implode,直接传递数组
where(['IN', 'Id', $array])
或
where(['Id' => $array]);