Skip to content

Commit 0e61a49

Browse files
committed
Document of transaction.
1 parent cbbc7a3 commit 0e61a49

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ which supports iterator and parameter binding when using "WHERE IN" statement.
1212

1313
* [Basic Usage](#basic-usage)
1414

15+
* [Transaction](#transaction)
16+
1517
* [Iterator](#iterator)
1618

1719

@@ -242,6 +244,21 @@ $DB->closeConnection();
242244
?>
243245
```
244246

247+
Transaction
248+
------------
249+
```php
250+
<?php
251+
try {
252+
$DB->beginTransaction();
253+
var_dump($DB->inTransaction()); // print "true"
254+
$DB->commit();
255+
} catch(Exception $ex) {
256+
// handle Error
257+
$DB->rollBack();
258+
}
259+
?>
260+
```
261+
245262
Iterator
246263
------------
247264

0 commit comments

Comments
 (0)