在这里,我收到这样的错误,
我的SQL查询就像,
:new
实际上是什么意思?
答案 0 :(得分:0)
问题应该是GROUP BY子句的语法。只需删除括号,就可以了。
SELECT *
FROM `fx_users_attendance`
LEFT OUTER JOIN `fx_account_details` ON fx_account_details.user_id = fx_users_attendance.user_id
LEFT OUTER JOIN `fx_departments` ON fx_departments.deptid = fx_account_details.department
LEFT OUTER JOIN `fx_users` ON fx_users.id = fx_users_attendance.user_id
WHERE fx_departments.deptid IN(1)
AND fx_users.id IN(5)
AND YEAR(clock_in) = YEAR(CURDATE())
GROUP BY 01,02,03,04,05,06,07,08,09,10,11,12