I am currently stuck with my logic.
I have created a database table for snedimg messages
table messages
looks like this
id | sender_id | reciver_id | msg | send_date |
1 | 2 | 6 | hello there i am testing | 2013-01-15
So what i am totally stuck with is the removing the message logic.
The problem what i dont understand how to solve is, lets say user
with the id 6
gets the message, and removes it by id, that way who sent the message wont be able to see it either.
So i am a bit lost at this, if someone could give me a hint on a logic i would really be happy
EDIT WITH MORE EXPLAINED DETAILS
So the problem is
id | sender_id | reciver_id | msg | send_date |
1 | 2 | 6 | hello there i am testing | 2013-01-15
this is the table. User recives the message, reads it, and for some reason wants to remove it.
Probmel is the DELETE LOGIC
, i know how to delete rows, what i dont know is how to solve the problem if the reciver deletes the message, the sender will be able to see it un the he/she deletes it.
For example on facebook they use archive instead of delete, this is the logic what i dont understand
active_for_sender
andactive_for_reciver
then just put a non-zero for active and a 0 for not active or "deleted"