Reputation: 16204
What could be done to get the old values back in the table after execution of any update query on it ?
I am using PHP and Mysql DB
Upvotes: 2
Views: 74
Reputation: 39763
By default: nothing. There is no way.
Unless maybe:
But otherwise, nope, sorry. The information is lost.
You should start thinking about doing one of the things stated above (backups are a MUST!, logging is adviseable while developing if your server can handle it) to avoid these situations in the future.
Upvotes: 2
Reputation: 625097
If you're using transactions and haven't committed the transaction, you just do a rollback.
If you aren't using a transactions or have committed your transaction then you're reliant on one of:
There is no other native mechanism.
Upvotes: 4