Ive been trying to figure this out for 2 days now. maybe my brain is fried but heres what im trying to do.
Im trying to gather all records related to a group in 3 sets.
set 1 uses a field in the File table called allow all.
set 2 uses the Link table below to gather all records With the group id
Set 3 is the problem....
I have a link table that looks like this
file_id group_id
3 1
2 2
2 1
6 2
5 2
what im trying to do is gather the file_id WITHOUT the group ID of 1
But the catch is that the file ID of 2 shouldnt show up because it DOES have the id of 1 but has others too.
Here is the query i tried to use but obviously doesnt work properly
SELECT *
FROM pportal_files, pportal_files_groups
WHERE 1
AND pportal_files.id = pportal_files_groups.file_id
AND pportal_files_groups.group_id != '1'
LIMIT 0,10
Do you follow this at all?
IF you need more info just lemme know.
THanks for any help.