PHP Classes

File: sampleread.php

Recommend this page to a friend!
  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: 14 years ago
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();