diff managedb.php @ 581:adc8f66f9c33

10L.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 02 Oct 2014 13:39:59 +0300
parents ba521a7e7653
children 83dee3e7c36f
line wrap: on
line diff
--- a/managedb.php	Thu Oct 02 13:37:15 2014 +0300
+++ b/managedb.php	Thu Oct 02 13:39:59 2014 +0300
@@ -76,7 +76,7 @@
   echo ($upgrade ? "Adding settings to" : "Upgrading settings in")." '".$table."' table.";
 
   $status = TRUE;
-  stDBExecSQL($outDB, "BEGIN TRANSACTION");
+  stDBBeginTransaction($outDB);
 
   foreach ($settings as $key => $data)
   {
@@ -130,7 +130,7 @@
   }
   echo "\n";
 
-  stDBExecSQL($outDB, "COMMIT");
+  stDBCommitTransaction($outDB);
   return $status;
 } 
 
@@ -142,7 +142,7 @@
   echo "Adding test data.\n";
 
   $status = TRUE;
-  stDBExecSQL($outDB, "BEGIN TRANSACTION");
+  stDBBeginTransaction($outDB);
 
   foreach ($siteTestData as $table => $data)
   {
@@ -169,7 +169,7 @@
     }
   }
 
-  stDBExecSQL($outDB, "COMMIT");
+  stDBCommitTransaction($outDB);
   return $status;
 }
 
@@ -197,7 +197,7 @@
   echo "Migrating tables...\n";
   $status = TRUE;
   $dbName = $outDB->getAttribute(PDO::ATTR_DRIVER_NAME);
-  stDBExecSQL($outDB, "BEGIN TRANSACTION");
+  stDBBeginTransaction($outDB);
   
   foreach ($sqlTables as $table => $schema)
   {
@@ -259,7 +259,7 @@
     echo "\n";
   }
 
-  stDBExecSQL($outDB, "COMMIT");
+  stDBCommitTransaction($outDB);
 
   return $status;
 }