Login   Register  
PHP Classes
elePHPant
Icontem

File: sampleread.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  Scheme Creator  >  sampleread.php  >  Download  
File: sampleread.php
Role: Example script
Content type: text/plain
Description: shows how to read the schema
Class: Scheme Creator
Get the schema of a MySQL database into a XML file
Author: By
Last change:
Date: 2009-04-13 07:38
Size: 392 bytes
 

Contents

Class file image Download
<?php

// filepath => {directorytoreadfrom}{databasenameinschemafile}.xml

$model "employees";

// read model from schema file
$showTable  = new SchemeReader("{directorytoreadfrom}""{databasenameinschemafile}");
$showTable->fetchModel($model);
$showTable->fetchTable();
$showTable->fetchColumns();
$showTable->fetchConstraints();

$attributes $showTable->getAttributes();