<?php

require '../config/database.php';

$stmt = $pdo->prepare("
UPDATE safety_concerns
SET status = 'OVERDUE'
WHERE status IN ('OPEN','IN_PROGRESS')
AND due_date < NOW()
");

$stmt->execute();

echo "Overdue update completed\n";