Login   Register  
PHP Classes
elePHPant
Icontem

File: demo6-transactionhandling.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bob Gombocki  >  PersistClass  >  demo6-transactionhandling.php  >  Download  
File: demo6-transactionhandling.php
Role: Example script
Content type: text/plain
Description: Transaction handling
Class: PersistClass
DB access wrapper & storing objects in DB tables
Author: By
Last change: added web tutorial info
Date: 4 years ago
Size: 426 bytes
 

Contents

Class file image Download
<?php

/*    
    http://coolpenguin.net/persistclass 
    for updates, documentation, tutorials
*/

// connect to database (executing demo 1)
require('demo1-connection.php');

// get connection object
$con DbConnectionPool::instance()->getConnection();

$con->startTransaction();
$sql 'INSERT INTO TESTTABLE(testcolumn) VALUES("INSERTSUCCESS")';
$con->rollBack();
//$con->commit();

echo 'Test successful';

?>