Yeah, a weird title for a weird problem...
users
user_id | firstname | lastname
users_attendance
attendance_id | user_id | thing_id
things_recent
recent_id | user_id | thing_id
Basically I want to select users.firstname, users.lastname, things_recent.thing_id where users.user_id = '2', and the user doesn't have a record in users_attendance.
How the heck do you do a 'Select records from a table, where there isn't a matching record in another table' query?! I've tried researching the different types of JOINs available, but they all seem to be the opposite of what i'm after..
Any ideas / advice would be appreciated
users
user_id | firstname | lastname
users_attendance
attendance_id | user_id | thing_id
things_recent
recent_id | user_id | thing_id
Basically I want to select users.firstname, users.lastname, things_recent.thing_id where users.user_id = '2', and the user doesn't have a record in users_attendance.
How the heck do you do a 'Select records from a table, where there isn't a matching record in another table' query?! I've tried researching the different types of JOINs available, but they all seem to be the opposite of what i'm after..
Any ideas / advice would be appreciated