Blasting a row into the past

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
elinews
Forum Commoner
Posts: 38
Joined: Tue Aug 14, 2007 7:18 pm

Blasting a row into the past

Post by elinews »

Say a user makes an unwanted change to a row in a database. What would I need to take as a precaution if I wanted to send it to the way it once. Looking for a practical solution that doesn't envolve making an enourmous database.
Thanks in advance.
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Post by Stryks »

I just want to clarify what you're asking.

A user comes along and makes a change, let's say a delete. You want to then give them the option to come back later (hours / days) and say 'oops' and hit a button to restore the deleted item to the existing database.

That sound along the lines of what you were thinking?
elinews
Forum Commoner
Posts: 38
Joined: Tue Aug 14, 2007 7:18 pm

Post by elinews »

Stryks wrote:I just want to clarify what you're asking.

A user comes along and makes a change, let's say a delete. You want to then give them the option to come back later (hours / days) and say 'oops' and hit a button to restore the deleted item to the existing database.

That sound along the lines of what you were thinking?
Yup. That's pretty much it.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

This really depends and can become a much larger task if it involve you need the capability to undo changes (or even several changes), such as you edited an article and wanted to revert back.

However, if all you want is to be able to "undo" deleting of accounts then you can create another column called active, and upon deleting the user simply set this to 0 or whatever. Basically to acquire all active users simply query active = 1

More info please..
Post Reply