📜  php pdo 绑定值数组 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:57.575000             🧑  作者: Mango

代码示例1
prepare(
    'SELECT *
     FROM table
     WHERE id IN(' . $inQuery . ')'
);

// bindvalue is 1-indexed, so $k+1
foreach ($ids as $k => $id)
    $stmt->bindValue(($k+1), $id);

$stmt->execute();
?>