我有一个数组$blshopids = [5,8];
,我想插入原始SQL语句:
$blshopids = [5,8];
$blshops = implode(",", $blshopids);
$product = 1;
...
where p1.product_id = :product
and p1.shop_id not in (:blshops)
..., ['product' => $product, 'blshops' = $blshops];
正如您所猜测的,$ blshops成为字符串'5,8'
而我得p1.shop_id not in ('5,8')
而不是p1.shop_id not in (5,8)
。知道怎么解决吗?