summaryrefslogtreecommitdiffstats
path: root/web/lib/aur.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/aur.inc.php')
-rw-r--r--web/lib/aur.inc.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 991fb14f..1a294a93 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -512,3 +512,24 @@ function parse_comment($comment) {
return $html;
}
+
+function begin_atomic_commit($dbh=NULL) {
+ if(!$dbh) {
+ $dbh = db_connect();
+ }
+ db_query("BEGIN", $dbh);
+}
+
+function end_atomic_commit($dbh=NULL) {
+ if(!$dbh) {
+ $dbh = db_connect();
+ }
+ db_query("COMMIT", $dbh);
+}
+
+function last_insert_id($dbh=NULL) {
+ if(!$dbh) {
+ $dbh = db_connect();
+ }
+ return mysql_insert_id($dbh);
+}