PHP Classes

File: examples/createtable.php

Recommend this page to a friend!
  Classes of philippe thomassigny   Dominion   examples/createtable.php   Download  
File: examples/createtable.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Dominion
Build and execute portable SQL queries
Author: By
Last change: patch 8.00.05
Date: 12 years ago
Size: 1,256 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);

echo <<<EOF
If you get an exception, you should edit db.php to fix the database type,<br />
database name, username and password of the database you are going to use<br />
to test the examples.<br /><br />
EOF;

// Load the instances

echo "Loading the instances...<br />";

require
'config/db.php';
/*
require 'config/country.php';
require 'config/language.php';
require 'config/citizen.php';
*/
// Create the tables

echo "Creating the 3 tables...<br />";

/*
$country->setDB($DB);
$country->synchronize(false);

$language->setDB($DB);
$language->synchronize(false);

$citizen->setDB($DB);
$citizen->synchronize(false);
*/

// fill the tables

echo "Filling the 3 tables...<br />";

/*
$BASE_country = new DB_Table('./config/country.xml');
//include_once('/home/sites/kalinu.com/include/common/database_def/BASE_country.inc');
$BASE_country->setDB($DB);

DB_TableExport::export('./data/tables/country.xml', $BASE_country);
DB_TableExport::exportDefinition('./data/tables/countrytest.xml', $BASE_country);

DB_TableImport::import('./data/tables/country.xml', $BASE_country);
*/



echo "Done.<br />";


?>