Hello,
My database
comments
ID mID aID attachID
1 1 6 1
2 2 6 1
3 3 6 1
4 8 6 2
5 4 6 2
So i'd like to allow access to user with mID to access attachID.
If they are viewing attachID 1, so users with mID of 1 or 2 or 3 can view. rest mID cannot.
EDIT : for attachID 1, users with mID 1 can see which other mID user can view too.
What would be the best approach to accomplish this?