Get previous value after update - MySql

前端 未结 3 1850
悲哀的现实
悲哀的现实 2021-01-27 23:07

I have a table which includes id and name

---    -----  
id     name
---    -----
1      pete

My scenarios looks like this

$sql         


        
3条回答
  •  北海茫月
    2021-01-27 23:42

    You cannot fetch the previous name unless you save it to your table as a backup.

    If you want to achieve this create one more column in your table and save the current name before updating to the new one.

提交回复
热议问题