Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    241
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Deleted Items Log question/clarification

    Hello,

    I have a few ideas for this already, but I would like to get others opinions/suggestions of how to go about accomplishing this log.

    My goal is to make a 'living' log. So when a user deletes something, it is copied there as a 'just in case' kind of thing. Also I want this log to be 'read-only' by the users.

    Here are my ideas (in case it matters, I am using php to do this).

    1. Create a text file that I append the deleted data along with the user who deleted the data.

    2. Make an xml file that stores the above info, but in xml format instead.

    3. Store these items in a 'maintenance' table.

    To save a couple of back and forths, I will kind of explain what is holding me up on this. My app is a newsletter generator/cms.

    So, I have a title, and an id. Then each newsletter has multiple categories, each category can have mutiple articles.

    Now, this was all good and well until they would like to remove entire newsletters. That's what made me lean toward the first 2 items I suggested.

    Any input (I hope constructive) would be great.

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Are you already storing the newsletter information in a database? If so, continue to use it. Instead of moving the data to a separate but identical table, why not just add an extra column to indicate who deleted it? And if the deletion column is null, you know the newsletter isn't deleted.

    So, I have a title, and an id. Then each newsletter has multiple categories, each category can have mutiple articles.
    That isn't an issue, in database terms that is called a many-to-many relationship, its easy to do.
    OracleGuy

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Posts
    241
    Thanks
    6
    Thanked 0 Times in 0 Posts
    oracleguy thanks for your response...I was beginning to worry.

    The 'user who deleted...' is really just a perk. I had a thread about this once before, and it was suggested to not allow SOME users to delete things. But unfortunately, this project has become a victim of bureaucracy...meaning, I was going to impliment 'roles' or 'groups' to allow some users to delete items...and others cant. BUT I was told, "there is a small enough user base that they will know what buttons to press"...now my opinion here is that is pretty presumptuous.

    And I have accidentally deleted something and wished it could be retrieved.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •