Answer the question
In order to leave comments, you need to log in
How to store information about new private messages in a chat?
For "self-learning" I decided to write a chat using PHP, MYSQL, JS, AJAX. In general, there are "dialogues", roughly speaking like Vkontakte. The server is polled with an ajax request.
I store information about new messages in a file on the server. That is, when a message is sent and when it is read, the file is overwritten. I'm afraid with a large online performance drop and errors.
I think you can increase the number of files, each for a specific group. Or is it better to connect to the database every request and look for new messages there?
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