projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New Company Setup 'Barcodes On Stock' implemented. Rep303 shows barcodes if set.
[fa-stable.git]
/
includes
/
db
/
sql_functions.inc
diff --git
a/includes/db/sql_functions.inc
b/includes/db/sql_functions.inc
index aead5d376e8c2f415925324f39dae6848dee46ce..66a781d25d868c21286076411c8f559df3394ff4 100644
(file)
--- a/
includes/db/sql_functions.inc
+++ b/
includes/db/sql_functions.inc
@@
-15,10
+15,11
@@
//-------------------------------------------------------------------
// Multilevel transaction control.
//
//-------------------------------------------------------------------
// Multilevel transaction control.
//
+$transaction_level = 0;
function begin_transaction()
{
function begin_transaction()
{
- global $transaction_level;
// set in set_global_connection()
+ global $transaction_level;
if (!$transaction_level) {
db_query("BEGIN", "could not start a transaction");
if (!$transaction_level) {
db_query("BEGIN", "could not start a transaction");
@@
-48,6
+49,7
@@
function cancel_transaction()
if ($transaction_level) {
db_query("ROLLBACK", "could not cancel a transaction");
}
if ($transaction_level) {
db_query("ROLLBACK", "could not cancel a transaction");
}
+ $transaction_level = 0;
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------