PHP code example of milantex / mysql-tso
1. Go to this page and download the library: Download milantex/mysql-tso library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
milantex / mysql-tso example snippets
use Milantex\DAW\DataBase;
use Milantex\TSO\TableStructureDescriptor;
# Enter database parameters
$daw = new DataBase('localhost', 'demo', 'root', '');
# Instantiate a table structure descriptor object
$tso = new TableStructureDescriptor($daw);
# Start the database analysis
$tso->analyse();
if ($tso->tableExists('page') &&
$tso->getTableStructure('page')->fieldExists('title')) {
echo 'Can page.title be null? ';
if ($tso->getTableStructure('page')
->getFieldStructure('title')
->isNullable()) {
echo 'Yes';
} else {
echo 'No';
}
}