First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$sdate = date("Y-m-d 00:00:00", time() - 60 * 60 * 24);
|
||||
$edate = date("Y-m-d 23:59:59", time() - 60 * 60 * 24);
|
||||
$query = "SELECT * FROM hotlunch_schedules WHERE start_order_datetime <= '$sdate' AND end_order_datetime >= '$edate' ORDER BY school_num";
|
||||
echo("$query\n");
|
||||
$results = db_query($query);
|
||||
|
||||
$num = db_num_rows($results);
|
||||
echo("Number of Schedules: $num\n");
|
||||
|
||||
$pschool = 0;
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
extract($row);
|
||||
|
||||
$numOrders = db_getVal("SELECT count(*) FROM hotlunch_order_header WHERE school_num = $school_num AND schedule_num = $record_num AND ordered_by_type != 'Concession'");
|
||||
if ($numOrders > 0) {
|
||||
if ($pschool != $school_num) {
|
||||
echo("\n");
|
||||
$query = "SELECT school_name FROM schools WHERE record_num = $school_num";
|
||||
$school_name = db_getVal("SELECT school_name FROM schools WHERE record_num = $school_num");
|
||||
echo("$school_name\n");
|
||||
$pschool = $school_num;
|
||||
}
|
||||
|
||||
echo(" - $schedule_name: $numOrders\n");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user