I'm trying to build a messaging system. The system that I create is only able to send message to a user. Trying to make a broadcast system and now I could send to multiple users. But now the problem is how I could make a notification when it's a new broadcast message, and how I could delete the broadcast message?
NB : When I delete the broadcast message with a user(example the user I use is 'user1'), the broadcast message will also deleted in another user account.
Can anybody help me how to solve this problem please?
EDIT
Here I got some table in my database
Table Message
id_message (INT(11))
to (VARCHAR(50))
from (INT(11))
title (TEXT)
user1delete (TINYINT(4))
user2delete (TINYINT(4))
Table Detail_Message
id_message (INT(11))
id_reply (INT(11))
from (INT(11))
message (TEXT)
user1read (TINYINT(4))
user2read (TINYINT(4))
Table Broadcast_Delete_Status
id_message (INT(11))
user (INT(11))
when the message is pointed to single user, the column 'to' in table message save the id of the recipient, and when it is a multiple or broadcast message, the column save "all user" or "all operator".