0
What happens in practice when I omit the begin transaction
and the commit
in a PHP script using PDO?
I have a loading script, which processes school data, every school that finishes processing I do a insert
. This code below is inside a loop that runs through a gigantic list of schools.
In that case I did not insert the begintran
and the commit
. He commits self after each insertion?
$insere = $pdo->prepare("Insert INTO `tabela`(campo1,campo2,campo3) VALUES (:valor1,:valor2,:valor3)");
$insere->bindValue(":valor1", $dado1);
$insere->bindValue(":valor2", $dado2);
$insere->bindValue(":valor3", $dado3);
$insere->execute();