kirkh34 Posted May 6, 2010 Share Posted May 6, 2010 hello, i'm creating a pm system where users can exchange messages, i have a message_id, to_id, from_id in my table of "messages"... everything works fine, one message is put into the database with it's unique id, my problem is... when say a sender deletes one of his sent messages, the receivers message is also deleted... i do not want this.. i've been trying to figure out how to set it up so that doesn't happen...2 copies of messages in the table? how can i go about doing this so each message, sent or received, is the users own... thanks Link to comment https://forums.phpfreaks.com/topic/200947-pm-system/ Share on other sites More sharing options...
iblood Posted May 6, 2010 Share Posted May 6, 2010 you may need 2 tables for both.. lets say inbox and sent..and save all corresponding messages to corresponding table Link to comment https://forums.phpfreaks.com/topic/200947-pm-system/#findComment-1054353 Share on other sites More sharing options...
Pikachu2000 Posted May 7, 2010 Share Posted May 7, 2010 Add a field to the db and use it as a flag. If the flag is set, the message doesn't show up in the sender's sent folder when displayed. Link to comment https://forums.phpfreaks.com/topic/200947-pm-system/#findComment-1054405 Share on other sites More sharing options...
bbaker Posted May 7, 2010 Share Posted May 7, 2010 agreeing with Pikachu on this one. Link to comment https://forums.phpfreaks.com/topic/200947-pm-system/#findComment-1054408 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.