mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-30 21:47:30 +00:00
- added methods for transaction handling
This commit is contained in:
parent
7470186a05
commit
e6916f98d3
|
@ -194,6 +194,27 @@ class LetoDMS_Core_DatabaseAccess {
|
|||
return $res;
|
||||
} /* }}} */
|
||||
|
||||
function startTransaction() { /* {{{ */
|
||||
if(!$this->_intransaction) {
|
||||
$this->_conn->beginTransaction();
|
||||
}
|
||||
$this->_intransaction++;
|
||||
} /* }}} */
|
||||
|
||||
function rollbackTransaction() { /* {{{ */
|
||||
if($this->_intransaction == 1) {
|
||||
$this->_conn->rollBack();
|
||||
}
|
||||
$this->_intransaction--;
|
||||
} /* }}} */
|
||||
|
||||
function commitTransaction() { /* {{{ */
|
||||
if($this->_intransaction == 1) {
|
||||
$this->_conn->commit();
|
||||
}
|
||||
$this->_intransaction--;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Return the id of the last instert record
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user