I'm a little stuck with a MySQL query:
I have table users
user_id|language|name 1 |en |Mike 2 |en |John 3 |en |Jesse 4 |de |Wolfgang (Me)
and table users_blocked
user_id|blocked_user_id 1 |4 4 |1 1 |3 3 |1 4 |2
(where user_id has blocked blocked_user_id)
I want to find all users (excluding myself) who speaks English (en), I haven't blocked them, they haven't blocked me. It should return only user with ID 3 from the example above.
I'm building a language partners search where it's excluding all blocked users (both ways) from the results.