sql - Table structure for Messages System -


I can store in the second table so that I can do quick queries in the message main table ... but I can not solve the problem of deleting the message. If a user deletes a message then the second should also read it. How can I make it? I googled but I did not find anything.

Create two fields in the text "itemprop =" text ">

your messages table:

  1. DeletedByFrom
  2. DeletedByTo
  3. < / Ol>

    Filter your results on:

      where deleted buffer = false  

    so you can only get rows Were not deleted (in this case 'from' users)


Comments