0

I made a wesite which have a webforum something like this site. Where a user can send message to each other. i am using php-mysql. i want to know how to store info about if user had read his message or its still unread. my site is www.thar.co.

mysql table-column for message are: message_id, message-by, message-to, message-body, message-date

Sorry for bad English hope i made my point.

Edited by rajesh.goblet: rest of site is not ready enough.

2
Contributors
2
Replies
5
Views
4 Years
Discussion Span
Last Post by rajesh.goblet
1

Add two fields to the message table: status_by, status_to - where 0 = visible, 1 = deleted for status_by and 0 = unread, 1 = read, 2 = deleted for status_to.

So the sender (by) can choose to delete the message from his 'sent' box - but it's still in the system so that recipient (to) can still see it. If just deleted from DB, the recipient would also lose the message. Similarly for the recipient. This method may allow the sender to see the unread/read status of the message with regard to the recipient if you want to allow that. Somehow I don't like that as it suggests 'spying'.

Edited by diafol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.