Hi everyone,
I performed a MYSQL update using php, however the update query was incorrect and updated the wrong rows.
Is it possible to rollback the update query or at least SELECT the rows performed by the last update query so I can tell which rows i need to change back?
thanks.
PHP/MYSQL - Rollback or list last rows affected by update
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: PHP/MYSQL - Rollback or list last rows affected by updat
You can manually SELECT the data from same rows before they will be UPDATEd -- just use the same WHERE clause. You can also use transactions and roll back the changes if there are problems. See the MySQL documentation for transactions.
(#10850)