PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Georgi Momchilov  >  DAO  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: DAO
Database access wrapper providing query queueing
Author: By
Last change: Reflects the new structure of the class
Date: 15 years ago
Size: 678 bytes


Class file image Download
/* this class is used in dao::setError() . it is NOT included! you can change the line */

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

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

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

$dao->queueSQL('DELETE FROM `table`', 'path/to/queuefile');

For more information send a message to info at phpclasses dot org.