diff --git a/src/NodaTimeAutotranslater.php b/src/NodaTimeAutotranslater.php index ccd5c1b..dcb33e3 100644 --- a/src/NodaTimeAutotranslater.php +++ b/src/NodaTimeAutotranslater.php @@ -864,11 +864,16 @@ final class NodaTimeAutotranslater { $translations = self::getTranslations($timeInfo); + $this->_mysqli_noda->autocommit(false); + foreach ($translations as $tLang => $tLangValue) { $this->_insertStmt->bind_param("iss", $this->_znum, $tLang, $tLangValue); $this->_insertStmt->execute(); } + $this->_mysqli_noda->commit(); + $this->_mysqli_noda->autocommit(true); + } /**