Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nostadt/797d93f6d68aa83c70146f15278d36a0 to your computer and use it in GitHub Desktop.
Save nostadt/797d93f6d68aa83c70146f15278d36a0 to your computer and use it in GitHub Desktop.
TYPO3 8 LTS & 9 LTS - work with transactions
<?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