There is no real point to this article - it’s not one of my usually strong lectures and doesn’t feature a key take-away or call to action.
It’s ju...
For further actions, you may consider blocking this person and/or reporting abuse
I did exactly the same one time, where I used to be "careful" by writing everything as SELECTs first before changing them to UPDATEs, making extensive use of the command-line history. I ended up writing
UPDATE users SET first_name='Martin'; WHERE user_id=12345
. Clever me and my semicolons. It replicated 10,000+ changes to 300+ other sites and took down the whole system in short order. I tell that story in interviews when they ask for nightmare stories.Wow, that's one heck of a story!
Never use autocommit with SQL interpreters. After the UPDATE you probably will see the number of rows updated. If it's not 1 rollback, otherwise commit.
Always keep a historic table for each important entity of your system.