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

+30
View File
@@ -0,0 +1,30 @@
<?php
include "/m/data1/app.hotlunches.net/db.php";
$query = "SELECT DISTINCT school_num,ordered_by_num,schedule_num FROM hotlunch_order_items WHERE order_num = 0 AND school_num > 0";
$results = db_query($query);
$time = time() - 60 * 60;
while ($row = db_fetch_assoc($results)) {
extract($row);
$query = "SELECT * FROM hotlunch_order_header " .
"WHERE school_num = $school_num " .
"AND ordered_by_num = $ordered_by_num " .
"AND schedule_num = $schedule_num " .
"AND added_time < $time";
$oh = db_getVal($query);
if ($oh) {
extract($oh);
$query = "UPDATE hotlunch_order_items SET order_num = $record_num " .
"WHERE school_num = $school_num " .
"AND ordered_by_num = $ordered_by_num " .
"AND schedule_num = $schedule_num";
db_query($query);
}
}
?>