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

+47
View File
@@ -0,0 +1,47 @@
<?php
include "db.php";
$databases = array(
'hotlunch_20210427',
'hotlunch_20210628',
'hotlunch_20210701',
'hotlunch_20210922',
'hotlunch_20220430',
'hotlunch_20220714',
'hotlunch_20221007',
'hotlunch_20230424',
'hotlunch_20230624',
'hotlunch_20230704',
// 'hotlunch_20240824',
// 'hotlunch_20240825',
// 'hotlunch_20240826',
// 'hotlunch_20240827',
// 'hotlunch_20240828',
);
$Schools = array();
$query = "SELECT school_name, url, record_num FROM schools";
$results = db_query($query);
while ($row = db_fetch_assoc($results)) {
$Schools[] = $row;
}
for ($i = 0; $i < count($databases); $i++) {
$db = $databases[$i];
echo("$db\n");
db_query("USE $db");
for ($n = 0; $n < count($Schools); $n++) {
$school = $Schools[$n];
extract($school);
$query = "UPDATE schools SET url = '$url' WHERE record_num = $record_num";
db_query($query);
}
}
?>