I'm having a hard time trying to figure out how to create something like this.
I already know how to make a basic PM/IM system, and how to set up the DB for it.
But how can I make an IM system (like with Facebook and Gmail/G+) where you can start off messaging one person, but ADD people to the conversation?
I was originally thinking something like this:
Create two DB tables (conversations and conversations_messages).
`conversations` would hold stuff like the ID of the convo and the users involved.
`conversations_messages` is basically like my original table example (id,to_user,from_user,time,status), but the status would have to be different for each person who hasn't read the last message.
Ex. John read the last message, so it's marked as 'read' for him, but not for EVERYBODY. That would mean that I would somehow have to make `status` hold multiple values, but how could I select the message status for ONE individual that way?
For `conversations`, I don't think it'd be too wise to store all the users involved in a JSON array, because I can't really select accurately with SQL then (and if I could, it would take longer).
So how does someone make something like this?
Any help is much appreciated. Thanks! (: