First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<pre>
|
||||
<?php
|
||||
include "db.php";
|
||||
|
||||
$tableName = "schools";
|
||||
|
||||
$pattern = "| %-60s | %-70s |\n";
|
||||
$patternH = "| %-130s |\n";
|
||||
|
||||
printf("+---------------------------------------------------------------------------------------------------------------------------------------+\n");
|
||||
printf($patternH, $tableName);
|
||||
printf("+--------------------------------------------------------------+------------------------------------------------------------------------+\n");
|
||||
|
||||
printf($pattern,"Field","Type");
|
||||
printf("+--------------------------------------------------------------+------------------------------------------------------------------------+\n");
|
||||
|
||||
$query = "SHOW columns FROM $tableName";
|
||||
$results = db_query($query);
|
||||
|
||||
while ($row = db_fetch_array($results)) {
|
||||
printf($pattern,$row[0],$row[1]);
|
||||
}
|
||||
|
||||
printf("+--------------------------------------------------------------+------------------------------------------------------------------------+\n");
|
||||
|
||||
?>
|
||||
</pre>
|
||||
Reference in new issue
Block a user