I found this code on SO, which is great for using PDO and the IN() statement together.
$values = explode(\',\', $values) ; # 1,4,7 $placeholders = rtrim(str
You forgot to prepare it ^_^
$query = "SELECT * FROM table WHERE id IN ($placeholders) AND product=?"; $stm = $db->prepare($query) ; $stm->execute($values,$product) ; //p00f
And aside from that execute() should only have one parameter
execute()
So the above won't work AT ALL!
See the DOCs