PDO4You\Describe::showMySqlTables PHP Method

showMySqlTables() private static method

MySQL method to display the tables of the database
private static showMySqlTables ( ) : void
return void
    private static function showMySqlTables()
    {
        Singleton::setStyle();
        $tables = Singleton::select("SHOW TABLES;");
        $index = array_keys($tables[0]);
        $database = preg_replace('~tables_in_~i', '', $index[0]);
        $html = '<div class="pdo4you">';
        $html .= '<strong>Database:</strong> ' . $database . ' &nbsp;<strong>Total of tables:</strong> ' . count($tables) . '<br />';
        foreach ($tables as $k1 => $v1) {
            foreach ($v1 as $k2 => $v2) {
                $desc = Singleton::select("DESCRIBE " . $database . "." . $v2);
                $html .= '<div class="code title">Table: <span>' . $v2 . '</span></div>';
                $html .= '<div class="code trace">';
                foreach ($desc as $k3 => $v3) {
                    $html .= '<div class="number">&nbsp;</div> <span><i style="color:#00B;">' . $v3['field'] . "</i> - " . strtoupper($v3['type']) . '</span><br />';
                }
                $html .= '</div>';
            }
        }
        $html .= '</div>';
        echo $html;
    }