First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
include "db.php";
|
||||
|
||||
$query = "SELECT hloh.school_num,school_name,hloh.schedule_num,ordered_by_num,order_total,added_date,sum(extended_price) " .
|
||||
"FROM hotlunch_order_header AS hloh,hotlunch_order_items AS hloi, schools AS s " .
|
||||
"WHERE hloh.ordered_by_type = 'Student' " .
|
||||
"AND order_total = 0.00 " .
|
||||
"AND hloh.record_num = hloi.order_num " .
|
||||
"AND hloh.added_date > '2012-12-01' " .
|
||||
"AND hloi.active != 'N' " .
|
||||
"AND s.record_num = hloh.school_num " .
|
||||
"group by 1,2,3,4,5,6 " .
|
||||
"having sum(extended_price) > 0 " .
|
||||
"order by 2,6";
|
||||
$results = db_query($query);
|
||||
if (db_num_rows($results)) {
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
print_r($row);
|
||||
echo("================================================================\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user