<?php
try
{
include_once("connection.inc.php");
include_once("mysql_database.inc.php");
$db = DBFactory::CreateDatabaseObject("MySqlDatabase");
$db->Connect($server, $database, $username, $password);
$dt = $db->Execute("SHOW CREATE TABLE test.person");
$dt->MoveNext();
$content = "Table Definition<br><pre>";
$content .= $dt->Field("Create Table") . "<br>";
// or use:
//$content .= $dt->Field(0) . "<br>";
$content .= "</pre>";
}
catch (Exception $ex)
{
$content = "Exception Caught: " . $ex->getMessage() .
"<p>Trace: " . $ex->getTraceAsString() . "</p>";
}
echo $content;
?>
|