[Cs-content-commits] SF.net SVN: cs-content:[406] trunk/1.0/db_types/cs_phpDB__mysql.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-07-15 16:14:41
|
Revision: 406
http://cs-content.svn.sourceforge.net/cs-content/?rev=406&view=rev
Author: crazedsanity
Date: 2009-07-15 16:14:38 +0000 (Wed, 15 Jul 2009)
Log Message:
-----------
Transaction support for mysql (sort of).
NOTE::: transactions only work for tables that are InnoDB... rolling back a
transaction that is against tables that don't support transactions can/will
cause data to become corrupted.
/db_types/cs_phpDB__mysql.class.php:
* beginTrans() [NEW]:
-- sends "BEGIN" to the backend & always returns true
* commitTrans() [NEW]:
-- sends "COMMIT" to the backend, always returns true
* rollbackTrans() [NEW]:
-- sends "ROLLBACK" to the backend, always returns true
Modified Paths:
--------------
trunk/1.0/db_types/cs_phpDB__mysql.class.php
Modified: trunk/1.0/db_types/cs_phpDB__mysql.class.php
===================================================================
--- trunk/1.0/db_types/cs_phpDB__mysql.class.php 2009-07-15 14:54:41 UTC (rev 405)
+++ trunk/1.0/db_types/cs_phpDB__mysql.class.php 2009-07-15 16:14:38 UTC (rev 406)
@@ -791,6 +791,31 @@
+ //=========================================================================
+ public function beginTrans() {
+ $this->exec('BEGIN');
+ return(true);
+ }//end beginTrans()
+ //=========================================================================
+
+
+
+ //=========================================================================
+ public function commitTrans() {
+ $this->exec('COMMIT');
+ return(true);
+ }//end commitTrans()
+ //=========================================================================
+
+
+
+ //=========================================================================
+ public function rollbackTrans() {
+ $this->exec('ROLLBACK');
+ return(true);
+ }//end rollbackTrans()
+ //=========================================================================
+
} // end class phpDB
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|