Okay, I'm working with PHP and MySQL.
I have 3 tables I'm working with: a Users table, a Sources table, and a Permissions table.
Sources have a one to many relationship with the Permissions table. Each entry is just a source id (links to source_id in Sources table) plus a user id (links to user_id in Users table).
So I need to select all the Sources, and generate a list box of all users that do not already have an entry in the Permissions table, or in others words all users that have not been granted permission for the particular source.
I think I got pretty close to making this work, but the logic and necessay SQL is scrambling my brain. I'm new to SQL so any help you can provide would be appreciated!
Cheers,
CJ
I have 3 tables I'm working with: a Users table, a Sources table, and a Permissions table.
Sources have a one to many relationship with the Permissions table. Each entry is just a source id (links to source_id in Sources table) plus a user id (links to user_id in Users table).
So I need to select all the Sources, and generate a list box of all users that do not already have an entry in the Permissions table, or in others words all users that have not been granted permission for the particular source.
I think I got pretty close to making this work, but the logic and necessay SQL is scrambling my brain. I'm new to SQL so any help you can provide would be appreciated!
Cheers,
CJ