Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 527 Bytes

transactions.rst

File metadata and controls

21 lines (14 loc) · 527 Bytes

Transactions

Idiorm doesn’t supply any extra methods to deal with transactions, but it’s very easy to use PDO’s built-in methods:

<?php
// Start a transaction
ORM::get_db()->beginTransaction();

// Commit a transaction
ORM::get_db()->commit();

// Roll back a transaction
ORM::get_db()->rollBack();

For more details, see the PDO documentation on Transactions.