Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
02-01-2014, 05:52 PM #1
- Join Date
- Apr 2013
- Reading, Pennsylvania
- Thanked 0 Times in 0 Posts
PHP & MySQL IM w/ Optional Feature to Add People to the Chat
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! (: