What happens in practice when I omit begin transaction
and commit
in a PHP script using PDO?
I have a load script, which processes the school data, with each school that finishes processing I make a insert
. This code below is in a loop that runs through a gigantic list of schools.
In this case I did not insert begintran
and commit
. Does he eat 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();