
 sinasalek - 2007-07-26 06:52:37
 
Hi,
thanks for this useful class. i extend it with some new
functionalities and i thought it would be a good idea to send it to you.
so other people can benefit from it.
Change Log :
- oracle transaction support :
    - _commitMode variable 
    - startTransaction() method //start a transaction
    - commit() method //apply changes to database
    - rollback() method //rollback changes within current open transaction
- insert() & update() method
- query stack (keeps the last and all of executed tables)
    - _queriesStack variale //contains all of executed sql(s)
    - _lastQuery variable //contains the last executed query
    - registerQuery() method //add query to queries stack
    - getLastQuery() method //get the last executed query
insert & update usage :
$columnsValues=array('name'=>'new name');
$dbc->insert('news',$columnsValues);
$columnsValues=array('name'=>'new name');
$dbc->update('news','id',$columnsValues,'4');
transaction usage :
$dbc->startTransaction();
$columnsValues=array('name'=>'new name');
if (!$dbc->insert('news',$columnsValues)) {
  $dbc->rollback();
} else {
 $dbc->commit();
}
SOURCE CODE : http://salek.ws/projects/oracle/Oracle.lib.php.txt