Created
May 22, 2019 13:41
-
-
Save nostadt/797d93f6d68aa83c70146f15278d36a0 to your computer and use it in GitHub Desktop.
TYPO3 8 LTS & 9 LTS - work with transactions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tx_foo_yourtable'); | |
$connection->transactional(function (Connection $connection) { | |
// Perform transactional queries here | |
}); | |
// Code from Mathias wild Brodala. For quick reference I created a gist. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment