我创建了一个用于渲染超时的模块。在模块中,您将选择您的批准人,最多为 3 人。
manager1_date场景是,如果不是NULL、manager2_date不是NULL和manager3_date不是,我将显示所有批准的加班NULL。但正如我所说,它只能是 1,2 或 3 个批准人。如果我申请了,那么我只有 2 个批准人,应该是 if manager1_dateis notNULL和manager2_dateis not NULL。
我试过这个查询:
Select * from table1
where manager1_date is not null
AND (manager2_date is not null or manager3_date is not null)
在 PHP 中,它显示记录,但记录有第三个批准人manager3_date是NULL。在填写批准人之前,它不应显示记录。