<?php // require_once '../../src/SourceForge/SchemaDB/autoload.php'; // use SourceForge\SchemaDB; // $schema = array('My_Table' => array('My_Field' => 1)); // echo '<pre>'; var_dump($schema); echo '</pre>'; // SchemaDB\Parser::parseSchemaDB($schema); // echo '<pre>'; var_dump($schema); echo '</pre>';
$notations = array("", "Hello World!", SchemaDB\Table::VARCHAR, SchemaDB\Table::TEXT, array(0, 1, 2), SchemaDB\Table::DATE, SchemaDB\Table::DATETIME); ?> <table border=1 cellpadding=4> <tr><th>Notation</th><th>Value</th><th>Type</th><th>Column</th></tr> <?php foreach ($notations as $notation) { ?> <tr> <td><?php var_dump($notation); ?> </td> <td align="center"><?php echo SchemaDB\Parser::getNotaionValue($notation); ?> </td> <td align="center"><strong><?php echo SchemaDB\Parser::getNotationType($notation); ?> </strong></td> <td><pre><?php echo var_dump(SchemaDB\Parser::schema_parse_table_column($value)); ?> </pre></td> </tr> <?php } ?> </table>
$notations = array(null, true, false, SchemaDB\Table::PRIMARY_KEY); ?> <table border=1 cellpadding=4> <tr><th>Notation</th><th>Value</th><th>Type</th><th>Column</th></tr> <?php foreach ($notations as $notation) { ?> <tr> <td><?php var_dump($notation); ?> </td> <td align="center"><?php echo SchemaDB\Parser::getNotaionValue($notation); ?> </td> <td align="center"><strong><?php echo SchemaDB\Parser::getNotationType($notation); ?> </strong></td> <td><pre><?php echo var_dump(SchemaDB\Parser::parseSchemaTableField(null, $notation)); ?> </pre></td> </tr> <?php } ?> </table>