You can see the table that I have here:
I filled it with random values for now because I just want to check if the code works. The code I am using is the following:
try {
$tempdel = $pdo->prepare("DELETE FROM splatoon_players WHERE id = 1;
DELETE FROM splatoon_players WHERE id = 2;
DELETE FROM splatoon_players WHERE id = 3;
DELETE FROM splatoon_players WHERE id = 4;
DELETE FROM splatoon_players WHERE id = 5;
DELETE FROM splatoon_players WHERE id = 6;
DELETE FROM splatoon_players WHERE id = 7;
DELETE FROM splatoon_players WHERE id = 8;");
$tempdel->execute();
} catch (PDOException $e) {
$error = "Unable to execute the query. ". $e->getMessage();
exit();
}
I have spent almost an hour to find out where's the error but I cannot get it. I am using the PDO class of course.
If I execute all the 8 queries in the phpmyadmin shell they work perfectly but running a *.php script with the code above they don't work.
When I say that "they don't work", I simply mean that those rows are still in the table instead of being deleted. The deletion doesn't happen. Any idea?