Main information: the user management system is intended for registration. My admin table and user table are separated. Problem: Problem 1: the admin (website administrator) can specify a user to push messages or push messages to all users, you can also push messages to users whose registration invitation code is... main information: it is intended to be a user management system.
Invite Registration. My
Admin table and user tableIs separated.
Problems:
Question 1: The admin (website administrator) can specify a user to push messages, or push messages to all users, or push messages to users whose registration invitation code is.
Question 2: I can register with you through my invitation codeUser GroupTo push messages, you can also registerUserPush messages.
My idea is:
Idea 1: create a message table. When I send a message to a user group, I find all the IDs and write them into the table, when querying at the front-end, check whether the table has the id of the user. If yes, it is displayed. However, I think this idea is unreasonable. If there are 1000 users on the website, writing is time-consuming, and the user interface is time-consuming for reading. In addition, you cannot determine whether the user is read or unread. In this way, a data corresponds to multiple IDs.
Idea 2: resume a message table. When I send messages to a user group, I find all the IDs and insert these IDs into this table cyclically. In this way, the user is read or unread, because each id corresponds to a piece of data. However, if my website has 10000 members, if I push a piece of data every day and other users send messages for a long time, the table will have hundreds of thousands or millions of data records, sooner or later, the database will be dragged to death. This is not the best way.
I hope you can give me a better idea if you have such knowledge. Thank you.
Reply content:
Main information: it is intended to be a user management system.Invite Registration. MyAdmin table and user tableIs separated.
Problems:
Question 1: The admin (website administrator) can specify a user to push messages, or push messages to all users, or push messages to users whose registration invitation code is.
Question 2: I can register with you through my invitation codeUser GroupTo push messages, you can also registerUserPush messages.
My idea is:
Idea 1: create a message table. When I send a message to a user group, I find all the IDs and write them into the table, when querying at the front-end, check whether the table has the id of the user. If yes, it is displayed. However, I think this idea is unreasonable. If there are 1000 users on the website, writing is time-consuming, and the user interface is time-consuming for reading. In addition, you cannot determine whether the user is read or unread. In this way, a data corresponds to multiple IDs.
Idea 2: resume a message table. When I send messages to a user group, I find all the IDs and insert these IDs into this table cyclically. In this way, the user is read or unread, because each id corresponds to a piece of data. However, if my website has 10000 members, if I push a piece of data every day and other users send messages for a long time, the table will have hundreds of thousands or millions of data records, sooner or later, the database will be dragged to death. This is not the best way.
I hope you can give me a better idea if you have such knowledge. Thank you.
Http://www.workerman.net/web-sender
For message pushing, see this