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
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
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.
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.