xPDO.rollBack
Last updated Oct 17th, 2026 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn morexPDO::rollBack¶
Rolls back the current transaction. Returns false if no connection is available, otherwise the result of the underlying PDO::rollBack().
Syntax¶
boolean rollBack ()
Example¶
$xpdo->beginTransaction();
try {
// ... write operations ...
$xpdo->commit();
} catch (Exception $e) {
$xpdo->rollBack();
}
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










