TeddyKiller Posted April 2, 2010 Share Posted April 2, 2010 I'm creating a mail system for my users on my website. For now it'll be basic. Compose message, send it etc. and then it displays in the users inbox. (In which they sent it to) The mailmessage table will have the following collums: id, from_id, to_id, message, status I might be missing a few, but basically this includes the message id, the message, who its from and who its to, and the status.. so read, or unread. If I added in a sent section, (so users can see the messages they have sent) as users can delete the messages in their inbox, it'll delete them from the sent messages too. I'm sorry if I make no sense. I could set it so that .. it has another 2 collums. to_status, and from_status. So if there both set as delete, then the row gets deleted. (Or kept for admins only to check for abuse if one was reported for it etc) Though if the user who sent it, will see the messages.. but it'll be seen only if the from_status is not deleted.. If that makes sense? Please tell me if theres abetter way, for the whole system. Thanks Link to comment https://forums.phpfreaks.com/topic/197355-mailing-another-user-system/ Share on other sites More sharing options...
ignace Posted April 2, 2010 Share Posted April 2, 2010 You could set a delete field with a 0 or 1 then when retrieving WHERE delete = 0 Link to comment https://forums.phpfreaks.com/topic/197355-mailing-another-user-system/#findComment-1035887 Share on other sites More sharing options...
TeddyKiller Posted April 2, 2010 Author Share Posted April 2, 2010 Yeah, but using the from_status and to_status collums, or.. another method? Link to comment https://forums.phpfreaks.com/topic/197355-mailing-another-user-system/#findComment-1035893 Share on other sites More sharing options...
TeddyKiller Posted April 2, 2010 Author Share Posted April 2, 2010 Ah I understand what you meant, I didn't read delete field. Though if theres an inbox, and sent messages, if it gets deleted from inbox, it'll get deleted from sent. Unless I had two different tables, correct? Link to comment https://forums.phpfreaks.com/topic/197355-mailing-another-user-system/#findComment-1035908 Share on other sites More sharing options...
ignace Posted April 2, 2010 Share Posted April 2, 2010 It will be "removed" yes but administrative personnel is still able to read the messages. Link to comment https://forums.phpfreaks.com/topic/197355-mailing-another-user-system/#findComment-1035998 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.