From 0e61a494ca0d2b044d2ae1137e18cc13b05d87ba Mon Sep 17 00:00:00 2001 From: lincanbin Date: Sat, 26 Jan 2019 14:57:17 +0800 Subject: [PATCH] Document of transaction. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 4c7db02..7117114 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ which supports iterator and parameter binding when using "WHERE IN" statement. * [Basic Usage](#basic-usage) +* [Transaction](#transaction) + * [Iterator](#iterator) @@ -242,6 +244,21 @@ $DB->closeConnection(); ?> ``` +Transaction +------------ +```php +beginTransaction(); + var_dump($DB->inTransaction()); // print "true" + $DB->commit(); +} catch(Exception $ex) { + // handle Error + $DB->rollBack(); +} +?> +``` + Iterator ------------