First Commit

This commit is contained in:
mark committed 2026-10-19 15:22:52 -07:00
1 parent 5eb9dd037d
commit 2e62c0e60b
11877 files changed
+2035312

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
<?php
include "db.php";
$tableName = "schools";
if ($argc > 1) $tableName = $argv[1];
else {
$table = readline("Table (schools): ");
if (strlen(trim($table))) $tableName = $table;
}
$arrayName = readline("Array ($tableName): ");
if (strlen($arrayName) == 0) $arrayName = $tableName;
echo("\n");
echo("\$$arrayName = array();\n");
$query = "SHOW columns FROM $tableName";
$results = db_query($query);
while ($row = db_fetch_assoc($results)) {
$field = $row['Field'];
echo('if (isset($' . $field . ')) $' . $arrayName . "['" . $field . "'] = $" . $field . ";\n");
}
echo("\n");
?>