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 Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
bbaker Posted May 7, 2010 Share Posted May 7, 2010 agreeing with Pikachu on this one. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.