以下のクエリを実行すると:
$where = array(
$request->get("order_item_id"), //an array with integers
);
$types = array(
\Doctrine\DBAL\Connection::PARAM_INT_ARRAY
);
$sql = "SELECT id,store_id FROM order_items WHERE id IN (?) ORDER BY id";
$query = $app['db']->executeQuery($sql, $where, $types);
$order_items = $query->fetchAll();
私はこれを得る:
Array
(
[0] => Array
(
[id] => 1
[0] => 1
[store_id] => 11
[1] => 11
)
[1] => Array
(
[id] => 6
[0] => 6
[store_id] => 11
[1] => 11
)
[2] => Array
(
[id] => 11
[0] => 11
[store_id] => 11
[1] => 11
)
余分な 0 と 1 の値が返される理由がわかりません。