Helo there, i just wanna ask something about sql structure. . I am not familiar about "sql joining" so i never tried to code this.
I have 3 tables named "1_group" and "2_group_member" and "3_message_from_a_group"
1_group contains the "group_id", "title", "owner".
And
2_group_member contains "id", "group_id", "user_id", "accepted".
And last
3_message_from_a_group contains "id", "message", "author", "group_id".
Now, i want that any user that was listed in 2_group_member wherein the value of accepted is 1/true will be able to see the content of 3_message_from_a_group.
In short: before i can see the messages from that group, i should be a member.
Could anyone help me please? Help me sql experts!
I have 3 tables named "1_group" and "2_group_member" and "3_message_from_a_group"
1_group contains the "group_id", "title", "owner".
And
2_group_member contains "id", "group_id", "user_id", "accepted".
And last
3_message_from_a_group contains "id", "message", "author", "group_id".
Now, i want that any user that was listed in 2_group_member wherein the value of accepted is 1/true will be able to see the content of 3_message_from_a_group.
In short: before i can see the messages from that group, i should be a member.
Could anyone help me please? Help me sql experts!
Comment