Login   Register  
PHP Classes
elePHPant
Icontem

File: ver.0.4/sample.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  >  QDataObject  >  ver.0.4/sample.php  >  Download  
File: ver.0.4/sample.php
Role: Example script
Content type: text/plain
Description: build model scheme form database
Class: QDataObject
Access MySQL query results as objects
Author: By
Last change:
Date: 2008-07-25 13:38
Size: 475 bytes
 

Contents

Class file image Download
include_once 'config.inc.php';

$link = mysqli_connect(
QConfig::get('db_default_host'),
QConfig::get('db_default_user'),
QConfig::get('db_default_password'),
QConfig::get('db_default_database')
) OR die(mysqli_error());


$sql = "SHOW TABLES";

$dataObject = QDataObject::getInstance("mysqli", $link, $sql)->getAllTables();


header("Content-type: text/xml");
echo "<?xml version='1.0' encoding='utf-8'?>";
echo $dataObject->buildScheme(true)->doRender();