Here is the relationship.
Table 1 has account info. Example:
ID username password ETC
1 michael racecars
2 jamesm stockcars
3 pokerp pocketaces
Lets say account ID #2 wants to "block" account ID #3 from being shown in his list of available members to contact. He can add them into his block list (table 2):
ID block_id
2 3
ID#2 has ID#3 blocked. Now I need to query a list of all accounts in table 1 (except any blocked IDs from table 2 - account ID #3 in this example).
Account ID #2 could have more than one blocks. Table 2 could read like this:
ID block_id
2 3
2 4
2 10
2 85
So in this case, we need to filter IDs 3, 4, 10 and 85 out of the list in table 1.
I've tried several queries (while, etc) and they all return the last result only (85). I can't get all the block_ids to be filtered from the list.
ANY help is much appreciated. This is the last piece we have to finish for the site and I'm sure it's something simple but I'm not familiar with advanced queries, etc.