summaryrefslogtreecommitdiff
path: root/docs/transactions.rst
blob: d249421f9cc17ee7a664c0c5e7e7228c3bd890b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Transactions
============

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

.. code-block:: php

    <?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`_.

.. _the PDO documentation on Transactions: http://www.php.net/manual/en/pdo.transactions.php