How to achieve the bulk of the message in the PHP station.

Source: Internet
Author: User
Need to do a station letter function, but mass do not know how to do, ask for help or who have examples can give reference?


Reply to discussion (solution)

Two methods
NO1. Send a message to all users ' really '.
NO2. Gets the program's TODO task when the user logs on.

Two methods
NO1. Send a message to all users ' really '.
NO2. Gets the program's TODO task when the user logs on.


The first method is not very feasible, if more people, the database can't stand it. Can the second method be described in detail?

The simplest way to do this is for everyone to see a list of notifications that the administrator sends.

Build a message table. Each user is logged in to the message table to find out if they have given themselves. Change the flag bit after reading.
The concurrency of publishing messages is not too large, the volume of data can be divided by time table, only concerned about the recent
You can also use Redis

Lazy words to re-establish a "notification" database, everyone login after loading can

 
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.