ok, this is what I came up with... because everything hinges on the value user_id of the third table, I had to create a temporary table, insert the values of the first join (table2 and table3), then join the temporary table and table1 to get the final values. If anyone knows an easier way, please post it... in case not, here is my 3:00 in the morning solution:
CREATE TEMPORARY TABLE matchTable (user_folder_id int(11),
notification_id int(11))
INSERT into matchTable select * from table2 left join table3 using (folder_id) where table3.user_id='$foo'
SELECT DISTINCT * from table1 left join matchTable using (note_id) where matchTable.note_id is NULL
etc... Anyway... i would love to condense this into a single query...
Thanks again.