Forum Moderators: coopster

Message Too Old, No Replies

Tying row del and dump together upon admin delete action

Looking for a secured way to do it

         

henry0

6:44 pm on Jan 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am required to give too much power to a super-admin!
My concern is that if the super-admin becomes “Trigger Happy”
It might generate a problem (Understatement)
My solution would be to create a DB dump tied to any del in the admin category

My question is:
How can I be sure that the backup will be properly achieved before the del happens and could a race exists where the winner will be the del action due to time to backup requirement obviously longer than a simple del query

Or am I looking at the wrong solution

coopster

10:03 pm on Jan 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



So basically you want to backup your database prior to any row deletion operations? Hmmm. How about using a transactional database instead? A DB dump certainly seems like a lot of overhead just for safeguarding the data.

Or perhaps you could invoke a 'Confirm Delete' page? That would force the user to review their option before actually executing it.

Just some ideas...

henry0

10:32 pm on Jan 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks
I was not really considering a total DB dump but a table dump only

However I will do first the “Double Check” for that one operation

(I am already too far in the project to transform my queries to
MyISAM in queries aiming at an Inno DB form that I never (yet) used)

And presently looking at your suggestions


To simulate transactions, you might use table-locking and your own error-handling, so you create a script that will use dynamic variables to accomplish the task at hand, keep the script/function separate so that you can use it from all over the place in different scripts as required.

coopster

10:39 pm on Jan 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yeah. I guess at some point you are going to have to trust the admins that you are granting this type of authority to as well. If they truly want to delete something and it is OK with you (your code) to do so, then allow the operation to be executed and do so with as much ease as they deem necessary. Of course, this is much easier to setup and allow as long as they could re-enter anything they *accidentally* deleted as well. Takes the burden off you ;)