...

View Full Version : Deleted Items Log question/clarification



dajohnson1s
08-24-2009, 06:32 AM
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.

oracleguy
08-24-2009, 03:21 PM
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.

dajohnson1s
08-24-2009, 06:06 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum