PHP Classes
elePHPant
Icontem

File: examples/table2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of philippe thomassigny  >  Dominion  >  examples/table2.php  >  Download  
File: examples/table2.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Dominion
Build and execute portable SQL queries
Author: By
Last change:
Date: 3 years ago
Size: 991 bytes
 

Contents

Class file image Download
<?php

// We assure any Dominion library we call will be automatically loaded
include_once '../include/__autoload.lib';

define ('WADEBUG', false);

// We set spanish messages file
// WAMessage::setMessagesFile('../messages/message.es.xml');

require 'config/db.php';

// Leemos 100 veces y creamos 100 veces la tabla desde disco duro
$t1 = new DB_uTime('N');
$t1->startChronometer();

for (
$i = 0; $i < 100; $i++)
{
  require
'config/country.php';
}

print
$t1->getChronometer() . '<br />';

// Start the SHM with 20Mb default size and default ID
$SHM = new WASHM();

// Leemos 100 veces y creamos 100 veces la tabla desde disco duro
$t1->startChronometer();

for (
$i = 0; $i < 100; $i++)
{
 
$ts = new TableSource(
   
'country',
   
'config/country.php',
    new
FastObjectSource(new FileSource('./', '', 'table.country.afo'),
                         new
SHMSource('country', $SHM)
                        )
  );

 
$country = $ts->read();
}

print
$t1->getChronometer() . '<br />';

?>