When working on a site, I found a fairly weird issue with PDO. The following code only selects posts made by user 1, not or 3.
$sql = "SELECT postid FROM posts WHERE userid IN (:friends)";
$pdo->prepare($sql);
$pdo->execute(array(':friends' => '1, 2, 3'));
However the following code selects post from all three:
$sql = "SELECT postid FROM posts WHERE userid IN (1, 2, 3)";
$pdo->prepare($sql);
$pdo->execute();
Why is this, and what can I do to make the first work like the second?