For reasons that should be obvious, this is murder to search for...
How do I do this in PDO:
SELECT thing FROM things WHERE thing_uid IN ( ... )
My particular use case is a string built by exploding an array taken from a form with several dozen checkboxes. In standard MySQL this is very easy...
$thingString = implode("', '", $thingArray);
$q = "SELECT thing FROM things WHERE thing_uid IN ('$thingString')";
but I want that to benefit from PDO's anti-injection protection... bound params and all that. So how can I do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…