Reputation: 2302
I want to implement a chat website (like yahoo, google chat), people can signup an account and chat with their friends (a group). But I don't know how to store the old message, may be I should save the message in Database or in a separate file? In one time, an account can have more than one chat group.
Give me some advice, thanks
Upvotes: 0
Views: 308
Reputation: 11876
Create a "messages_history" table in the database and stored the messages there. In this column may be userId, "message" etc..
or if you use file system then create new file for each user and update the file whenever any new message in chat.
Upvotes: 1