Hi All,
I have two tables: Table_a and Table_b. They both have a username field. I want to pull all the usernames in Table_A as long as they are not listed in Table_b. My query for Table_a by itself looks like this:
$query = "SELECT username FROM Table_a
WHERE user_type='{$_SESSION['user_type']}'
ORDER by username";
Can I tell it to exclude usernames which are also found in Table_b, all in the same query? Thanks so much!
I have two tables: Table_a and Table_b. They both have a username field. I want to pull all the usernames in Table_A as long as they are not listed in Table_b. My query for Table_a by itself looks like this:
$query = "SELECT username FROM Table_a
WHERE user_type='{$_SESSION['user_type']}'
ORDER by username";
Can I tell it to exclude usernames which are also found in Table_b, all in the same query? Thanks so much!