I have a table user
and in addition INNER JOIN
it with table cities
and a few others already. Now I also have the following table:
blocked_user
--------------------------------------------------------
id | user1_id | user2_id | timestamp
How can I use LEFT JOIN WHERE IS NULL
, so both user combinations (user1 blocked user2 or user2 blocked user1) are excluded from the search results?
user
--------------------------------------------------------
id | username | ...
Thank you very much in advance for you help!