<?php

require_once '../core/api_bootstrap.php';

$db = new Database();
$conn = $db->connect();

$conn->prepare("

UPDATE provider_subscriptions
SET status='expired'
WHERE expiry_date < CURDATE()
AND status='active'

")->execute();

echo "Expired subscriptions updated";