I am trying to learn MySQL select statements a little better and I have somehow ended up selecting multiple rows with the same values. If I remove the last JOIN the query comes out correctly, but I still need the tasks.Rate_Schedule_ID joined with hourlyrates.Rate_Schedule_ID, as shown in the last JOIN statement.
EDIT:
It is duplicating once for each row. Here is a picture of the results I am getting.

SELECT
project_timecard_tasks.Task_ID,
project_timecard_tasks.DateTime,
project_timecard_tasks.Total_Hours,
project_timecard_tasks.User_ID,
project_timecard_tasks.Project_ID,
users.User_ID,users.FirstName,
users.LastName,
tasks.id,
tasks.taskName,
tasks.billingOption,
tasks.fixedRate,
tasks.Rate_Schedule_ID,
hourlyrates.Rate_Schedule_ID,
hourlyrates.hourlyRate
FROM
project_timecard_tasks
JOIN users ON project_timecard_tasks.User_ID = users.User_ID
JOIN tasks ON project_timecard_tasks.Task_ID = tasks.id
JOIN hourlyrates ON tasks.Rate_Schedule_ID = hourlyrates.Rate_Schedule_ID
WHERE
project_timecard_tasks.Project_ID = '$jobNumber'
The issue is that you have multiple rows in your result (from the tasks table) with the same Rate_Schedule_ID. That means that for each of those, you get a match in your hourlyrates table, which gives you two matches for each row.
You can change your SELECT to SELECT DISTINCT, which will fix the problem. But this might be an indication that there is a deeper problem in your data.
The way to check if this is really the issue is to look at the result set without the last join. If there are duplicate Rate_Schedule_IDs, then that’s why it’s duplicating rows.