gpt4 book ai didi

php - 我只想显示日期为空的数据

转载 作者:行者123 更新时间:2023-11-29 12:17:55 27 4
gpt4 key购买 nike

我只想显示日期null的数据

这是我的查询:

$Query = "SELECT att.`EmployeeCode`,emp.FullName ,emp.EmployeeID,emp.Photo,sum(TIME_TO_SEC(att.FinalTime)/60 - IFNULL(sp.TotalTimeLateMark,$TotalTimeLateMark))  OverTime
FROM `hr_tblattendancehistory` att
left join hr_tblemployee emp on att.EmployeeCode = emp.CardID
left join hr_tblspecialattendancesetting sp on sp.Date = att.Date
WHERE emp.FullName!='' and att.`Date` Between '$FromDate' and '$Todate=''' and (TIME_TO_SEC(att.FinalTime)/60 -IFNULL(sp.TotalTimeLateMark,$TotalTimeLateMark)) > 0
group by att.`EmployeeCode`,emp.Photo,emp.FullName
order by SUM(TIME_TO_SEC(att.FinalTime)/60 -IFNULL(sp.TotalTimeLateMark,$TotalTimeLateMark)) DESC";

我该怎么做?

最佳答案

您可以使用IS NULL

例如

SELECT * FROM YourTable WHERE DateColumn IS NULL;

关于php - 我只想显示日期为空的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29465955/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com