I have an array $blshopids = [5,8];
that I want to insert into a raw SQL statement:
$blshopids = [5,8];
$blshops = implode(",", $blshopids);
$product = 1;
...
where p1.product_id = :product
and p1.shop_id not in (:blshops)
..., ['product' => $product, 'blshops' = $blshops];
As you guess $blshops becomes a string '5,8'
and I get p1.shop_id not in ('5,8')
instead of p1.shop_id not in (5,8)
. Any idea how to solve it?