I am trying to figure out how to get all tasks in this case that two of the fields equal a certain value or they exist in the other table?
Here is the query:
<
This sql matches the result set you posted in your duplicate post that has sample data and result:
SELECT t.task_id, t.task_complete, t.task_creator_id, t.task_assigned_user_Id
FROM tasks t
WHERE t.task_complete = 1 AND
(
t.task_creator_id = 8
OR t.task_assigned_user_id = 8
OR EXISTS
(
SELECT w.task_id
FROM watchers w
WHERE w.task_id = t.task_id
AND w.watcher_user_id = 8
)
)