I'm concerned that I could easily create a crawl in the database while trying to ensure that all users in the database can view the same messages. The problem is that I need to be able to send a message from my admin area and have all users receive notifications and also have the option to mark the message as read. I know I should create two tables but how to write sql commands to generate messages for all users becomes frustrating. This may be a simple task but I need help
I try to create two tables in my database. Notification and has__notify. Notification holds the message along with its title and creation date, while (has__notify) on the other hand contains columns like notificationID (foreign key), userID (foreign key) - to know which user has read the message, dateRead. However, I think my implementation is wrong as I'm already a bit confused.
P粉0154020132024-03-31 17:44:49
By default, the table is never locked during inserts. If you want to make sure the data is stored, you can use transactions.