Use mysqli->autocommit(false) to speed up autotranslating
This commit is contained in:
parent
7ab7b8341f
commit
1fe795d219
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user