First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$query = "SELECT * FROM `email_send_log` WHERE `school_num` = 3 AND `processed` > '2023-02-24 00:00:00'";
|
||||
$emails = db_query($query);
|
||||
|
||||
while ($row = db_fetch_assoc($emails)) {
|
||||
extract($row);
|
||||
$db = "hotlunch";
|
||||
$query = "SELECT school_num FROM school_contact_list WHERE contact_email = '$email'";
|
||||
$results = db_query($query);
|
||||
|
||||
if (db_num_rows($results) == 0) {
|
||||
$db = "hotlunch_20230222";
|
||||
db_query("USE hotlunch_20230222");
|
||||
$results = db_query($query);
|
||||
db_query("USE hotlunch");
|
||||
}
|
||||
|
||||
if (db_num_rows($results) == 0) {
|
||||
echo("$db: $email not found\n");
|
||||
echo(" - $query\n");
|
||||
}
|
||||
else {
|
||||
$row = db_fetch_assoc($results);
|
||||
$snum = $row['school_num'];
|
||||
$results = db_query("SELECT * FROM schools WHERE record_num = $snum");
|
||||
$row = db_fetch_assoc($results);
|
||||
$school_name = $row['school_name'];
|
||||
$status = $row['status'];
|
||||
|
||||
if ($status != 'Active') {
|
||||
echo("$snum: $email - $school_name - $status\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user