Answer the question
In order to leave comments, you need to log in
Fetch implementations from MySQL?
Hello!
There are 5 tables with relationships,
Organizations
Users
friends
Messages
fields
for Mesages :
id
user_id not null
organization_id
text
if the message is sent from an Organization , then the fields are filled in
user_id - user ID (message sender)
organization_id - organization ID (in which the message was posted)
if the message is sent by User -then the
user_id fields are filled - the user id (sender of the message)
organization_id - will be NULL
I do not know how to get all the messages of a specific user, his friends and organizations in which he is a member.
Of course, you can cycle, but this is not good, tell me where to dig?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question