我正在尝试加入 3 个表,但我的查询一直出错。我不确定我做错了什么。我的语法一定是做错了什么,但我不太确定哪里出了问题。
SELECT project_timecard_tasks.DateTime,
project_timecard_tasks.Total_Hours,
project_timecard_tasks.User_ID,
project_timecard_tasks.Task_ID,
project_timecard_tasks.Project_ID,
users.User_ID,
users.FirstName,
users.LastName,
tasks.id,
tasks.taskName
FROM project_timecard_tasks
JOIN project_timecard_tasks ON project_timecard_tasks.User_ID = users.User_ID
AND project_timecard_tasks.Task_ID = tasks.id
WHERE project_timecard_tasks.Project_ID = '$jobNumber'