I have two tables. One called user and one called invite.
user
id
username
squad_id
invite
id
user_id
squad_id
I want to pull out all of the rows in user that have a squad_id of 0 and the rows id is not in the user_id of the invite feild.
Example:
user
1|user1|0
2|user2|0
3|user3|1
4|user4|2
invite
1|1|14
2|3|23
I want the query to return row 2 (because squad_id is 0, and the id is not in the user_id column of the invite table). The squad_id of the invite feild doesnt matter.
Any help would be great.