Skip to content
Snippets Groups Projects
Commit 9b4f4f8e authored by Robert Anderson's avatar Robert Anderson
Browse files

Added db begin, commit and rollback transaction functions

parent 782e4140
No related branches found
No related tags found
No related merge requests found
......@@ -408,6 +408,40 @@ function DBLastInsertID()
}
# Function to begin a transaction
# Args: none
function DBBegin()
{
global $db;
$res = $db->beginTransaction();
return $res;
}
# Function to commit a transaction
# Args: none
function DBCommit()
{
global $db;
$res = $db->commit();
return $res;
}
# Function to rollback a transaction
# Args: none
function DBRollback()
{
global $db;
$res = $db->rollback();
return $res;
}
# Connet to database when we load this file
$db = connect_db();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment