First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$query = "SHOW tables";
|
||||
$tableSet = db_query($query);
|
||||
|
||||
while ($row = db_fetch_array($tableSet)) {
|
||||
$tableName = $row[0];
|
||||
|
||||
$query = "SHOW columns FROM $tableName";
|
||||
$results = db_query($query);
|
||||
|
||||
$tablePrinted = false;
|
||||
|
||||
while ($row = db_fetch_array($results)) {
|
||||
// print_r($row);
|
||||
$colName = $row[0];
|
||||
$colType = $row[1];
|
||||
$colDefault = $row[4];
|
||||
|
||||
// echo("$colName - $colType\n");
|
||||
|
||||
if (strpos($colType, 'enum') === 0) {
|
||||
if (!$tablePrinted) echo("\n$tableName\n");
|
||||
$tablePrinted = true;
|
||||
|
||||
if ($colDefault == '') $colDefault = "********";
|
||||
printf(" - %-35s %-90s %s\n", $colName, $colType, $colDefault);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user