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?