PHP site Notification of the problem how to implement it

Source: Internet
Author: User
How do I implement a notification problem in PHP station?
Only in-station notification required
Admin can send notifications in the background (mass and send notifications to designated members) users only accept view notifications no send permission

There is currently a my_messages table
The structure is as follows


Send a notification to a designated member must be inserting a piece of data in the my_messages.

Whole Station member mass notice how to design the table and realize it


Share to:


------Solution--------------------
I think you have to use two tables better, one to store user messages (Usermsg), with Userid,msgid,status
Another table (MSG) stores message content, Id,content,inserttime, etc.,
If you want to send to the group, insert the MSG table First, then insert the ID into the usermsg table, it feels better
------Solution--------------------
If it were me, my table structure would be:
ID message userlist
ID message body The IDs of all the users piece together an array, and then serialize the data into a string type to deposit this column

When someone has read the time to get userlist content, and then crossdress content into an array, the user's ID is deleted and then serialized into the UserList column.
------Solution--------------------
I have this problem, too.

2 Tables
A table stores notification information: ID, title, content, CTime, author, state
Another table stores the information that the user is reading:
ID, sid (corresponding notification table ID), UID (user ID), view (read), Hide (empty), CTime

What do you think?
  • 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.