PDA

View Full Version : backup table rows


BubikolRamios
01-02-2009, 10:30 PM
my plan is to let users edit rows in table, itherway they have to be logged in to do that, but who knows they may be bad boys or have no idea and would in table of cars insert donkey or something

if table is like this:


autoinc something something
1 data data
2 etc
3
4


I would have table A(original) and B(same as A except autoinc), and on each edit in A first copy original row to B.

Is this OK or there is a smarter way to then easily find and revert original data?

mlseim
01-02-2009, 11:18 PM
Have a field where you have to set a '1' to authorize the record.
So they enter what they want, and once per day, you go in with
an admin script and verify correct data and authorize the entries.

That would also serve a double purpose. You could "hide" any
entry by making the field '0'. Perhaps you wanted to add a bunch
of entries yourself, but not have them appear for a week or so.
You enter them all in ahead of time, and later, you enable them.