Mercurial > hg > fapweb
changeset 578:4227095a1384
Add functions for beginning and committing SQL transactions and use them.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 02 Oct 2014 13:35:30 +0300 |
parents | ba521a7e7653 |
children | 204106edd2b6 |
files | managedb.php msitegen.inc.php |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/msitegen.inc.php Wed Oct 01 11:31:47 2014 +0300 +++ b/msitegen.inc.php Thu Oct 02 13:35:30 2014 +0300 @@ -642,6 +642,20 @@ } +function stDBBeginTransaction($dbh = FALSE) +{ + global $db; + stDBExecSQL(($dbh !== FALSE) ? $dbh : $db, "BEGIN TRANSACTION"); +} + + +function stDBCommitTransaction($dbh) +{ + global $db; + stDBExecSQL(($dbh !== FALSE) ? $dbh : $db, "COMMIT"); +} + + function stDBGetTableSchema($dbh, $data) { $res = array();