How can I remove multiple values (in an array) from MySQL Database? I have a string with User-ID and an array of Article_IDs.
$user_id = 1;
$article_id = [1,2,3,4];
$deleteValues = "DELETE FROM my_table WHERE user_id = ? AND id = ?";
$delt = $db->prepare($deleteValues);
$delt->bindParam(1, $user_id);
$delt->bindParam(2, $article_id);
$delt->execute();
I have different users and articles in the Database. I need activated Prepare Statements. My Example doesn't work.Thank you!