Files
HotLunches/email-queue-check.php
2026-10-19 15:22:52 -07:00

23 lines
570 B
PHP

<?php
include "db.php";
$now = time();
$query = "select * from email_header " .
"where send_after_time <= $now " .
"and status = 'open' " .
"and (completed is null or completed < '1900-01-01' or processed_records = 0 or matching_records > processed_records) " .
"order by send_after_pst";
$email_header = db_query($query);
$num = db_num_rows($email_header);
echo("Email Header Records: $num\n\n");
if ($num > 0) {
while ($row = db_fetch_assoc($email_header)) {
$query = $row['query'];
echo("$query\n\n");
}
}
?>