Hello! Have a little problem with my query to database. My code:
try {
$products_update = Products::query()
->where("parent_id = :parent_id:")
->where("position >= :newIndex:")
->where("position < :oldIndex:")
->bind(array(
"parent_id" => $product->parent_id,
"newIndex" => $sort->newIndex,
"oldIndex" => $sort->oldIndex
))
->execute();
} catch (\Exception $e)
{
echo $e;
}
And I get the error:
Invalid parameter number: number of bound variables does not match number of tokens
But I can't understand what parameter I didn't bind. Please, help. Thank you very much!