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";
|
||||
|
||||
$school_num = 537;
|
||||
$cutoff_date = "2014-08-01";
|
||||
|
||||
$currUsers = array();
|
||||
|
||||
// Get set of orders to delete
|
||||
$orders = db_query("SELECT * FROM hotlunch_order_header WHERE school_num = $school_num AND added_date < '$cutoff_date'");
|
||||
while ($row = db_fetch_assoc($orders)) {
|
||||
$order_num = $row['record_num'];
|
||||
|
||||
db_query("DELETE FROM hotlunch_order_header WHERE school_num = $school_num AND record_num = $order_num");
|
||||
db_query("DELETE FROM hotlunch_order_items WHERE school_num = $school_num AND order_num = $order_num");
|
||||
db_query("DELETE FROM hotlunch_order_items_save WHERE school_num = $school_num AND order_num = $order_num");
|
||||
}
|
||||
|
||||
|
||||
db_query("DELETE FROM hotlunch_order_log WHERE school_num = $school_num AND added_date < '$cutoff_date'");
|
||||
db_query("DELETE FROM user_account WHERE school_num = $school_num AND transaction_datetime < '$cutoff_date 00:00:00'");
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user