我有一个功能可以检查某人的状态是否是某个值,如果是,并且在一年后,该人的状态将被更新。
这是代码
if (strtotime($csvstatuschange) < strtotime("-365 day") && (
$csvstatus == "Non-Active, Unable to Monitor - Incidental Business use Exclusion" ||
$csvstatus == "Non-Active - Insurance Cancelled" ||
$csvstatus == "Non-Active - Employee Not Covered Under Listed Policy" ||
$csvstatus == "Non-Active - No Longer Employed" ||
$csvstatus == "Non-Active - Other"
)) {
$status = "Archived";
$wsth = $DBH->prepare("
UPDATE csvdata
SET status = :status,
statuschangedate = :date
WHERE username = :username
");
$wsth->execute(array(
':status' => $status,
':username' => $csvusername,
':date' => $date
));
}
所以我的问题是 - 例如,如果人员状态是Non-Active - Insurance Cancelled
并且今天已更改。那里的状态仍然会改变。
感谢您的时间!