Location: PHPKode > scripts > DAO classes > example.php
include('alerter.class.php');
/* this class is used in dao::setError() . it is NOT included! you can change the line */

include('dao.class.php');
$dao = new dao('ibase');
$dao->db_logfile = '/path/to/logfile';

//example1:
$dao->query("INSERT into `table` SET `field1` = 'value1', `field2` = 'value2'");
$dao->commit(); 
$dao->rollback();

//example2:
$slave = $dao->getSlave();
$dao->connect( $slave );
while( $myrow = $dao->query("SELECT * FROM `table`") )
 	echo $dao->db_pointer.' - '.var_dump( $myrow ).'<br />';

//example3:
$dao->connect('master');
$dao->queueSQL('DELETE FROM `table`', 'path/to/queuefile');
$dao->executeQueue('path/to/queuefile');
Return current item: DAO classes