DBO execute returns true but doesn't execute I am having a bit of trouble with some of my code. This is the code:

$STMT3 = $PDO-&gt;prepare('
   INSERT INTO `lotteries_entries` (steamID, lottery_id) VALUES (:STEAMID, :ID);
   UPDATE `lotteries_entries` SET `winner` = 1 WHERE `lottery_id` = :ID ORDER BY RAND() LIMIT 1;
   UPDATE `lotteries` SET `status` = 1 WHERE `id` = :ID;
   INSERT INTO `lotteries` (status, type) VALUES (0, :TYPE);'
);

$STMT3-&gt;bindParam(':STEAMID', $_SESSION['STEAM_steamid'], \PDO::PARAM_INT);

$STMT3-&gt;bindParam(':ID', $result['id'], \PDO::PARAM_INT);

$STMT3-&gt;bindParam(':TYPE', $result['type'], \PDO::PARAM_INT);

$STMT3-&gt;execute();


Although the $STMT3 returnes true (by using var_dump to check it), it unfortunatly never Inserts or Updates any of the tables it was told to. I've tried to run the script on the MySQL "SQL" tab (Directly through SQL) and it work fine. No errors are thrown through the script, and the SQL code isn't problematic.

Please not i use transactions, and yes i have started an commited the transaction. Both start and commit is reached by the script without any difficulty.

To see the whole code please visit: https://gist.github.com/vasil7112/8913f002940aaeb2f682

Kind regards and wish you have had a wonderful year.
SOLUTION

The problem was fixed by adding this line after the execute.
$STMT3->closeCursor();

Thanks everyone that tried to help :)