Pluf Framework

Sign in or create your account | Project List | Help

Pluf Framework Commit Details

Date:2009-10-28 09:41:42 (4 months 19 days ago)
Author:Loïc d'Anterroches
Commit:718548557ca8435ff883b2665f459bb4604d6974
Message:Added the support of the MySQL transactions.

Files: src/Pluf/DB/MySQL.php (1 diff)

Change Details

src/Pluf/DB/MySQL.php
163163        return '`'.$col.'`';
164164    }
165165
166    /**
167     * Start a transaction.
168     */
169    function begin()
170    {
171        if (Pluf::f('db_mysql_transaction', false)) {
172            $this->execute('BEGIN');
173        }
174    }
175
176    /**
177     * Commit a transaction.
178     */
179    function commit()
180    {
181        if (Pluf::f('db_mysql_transaction', false)) {
182            $this->execute('COMMIT');
183        }
184    }
185
186    /**
187     * Rollback a transaction.
188     */
189    function rollback()
190    {
191        if (Pluf::f('db_mysql_transaction', false)) {
192            $this->execute('ROLLBACK');
193        }
194    }
195
166196    function __toString()
167197    {
168198        return '<Pluf_DB_MySQL('.$this->con_id.')>';

Archive Download the corresponding diff file

Branches:
master