title: PHP PDO: Array in Update SQL WHERE IN () clause
body: <p>I'm trying to take an array of ID numbers and update every row with that ID number. PHP PDO code follows:</p>
  
  <pre><code>private function markAsDelivered($ids) {
    $update = $this-&gt;dbh-&gt;prepare("
       UPDATE notifications
       SET notified = 1
       WHERE notification_id IN (
          :ids
       )
    ");
    $ids = join(',', $ids);
    Logger::log("Marking the following as delivered: " . $ids, $this-&gt;dbh);
    $update-&gt;bindParam(":ids", $ids, PDO::PARAM_STR);
    $update-&gt;execute();
  }
  </code></pre>
  
  <p>However, when this is run, only the first item in the list is getting updated, although multiple ID numbers are being logged. How do I modify this to update more than one row?</p>