Hey, This is a question that was brought up to my attention when I successfully made this little note message system. (Message Reply Sequencing)

After I built this little note system for my users, it sent , replied, and viewed all notes fine.

But the problem I wasn't really aware of was the deletion of notes as user Coruscate brought up on the thread linked above.

If user Bob sends a note to user Tony, then the inbox would look like this:

Tony's Inbox: (click note id to read)<br><br> id creator date reply delete 1 Bob 12/30/03 [-reply button-] [--] + [-delete selected messages-]
Now lets say user Tony replies saying "hi" to Bob.

Bob's inbox would now look like this.

Bob's Inbox: (click note id to read)<br><br> id creator date reply delete 1 Bob 12/31/03 [-reply button-] [--] + [-delete selected messages-]
So lets say user Bob reads the reply from Tony and decides to delete the message, then that means Bob's INBOX should view no more messages and Tony's INBOX should still have the message from Bob because Tony did no deletion action. My problem is that once Bob deletes a message, then Tony's INBOX will also have no messages because Bob deleted the message.

If you read the thread I linked above, you can see that the database is setup with only one column to determine the status of the message, so if one user deletes a message, it'll update that column with the value of "DEL". My inbox code does not view any messages if the status value is "DEL".

I tried fixing this problem by having two status columns instead, status1, status 2. If bob deletes a message then it'll update status1 to 'del', but status2 will still be 'notread'. This solution to my problem is not working because I can not get everything to work accordingly.

Am I on the right track , or is there a better solution to this problem?

Any help is appreciated :)

Thank you,
Anthony

In reply to Message deletion options by perleager

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.