MySQL trigger to see previous data history

 








First wee need to create a Database in Phpmyadmin. In my case I create a database name call test. And I created two table employers and employers logs. We will trigger the employers table and collect the previous history is employers logs table. Here is the picture of my employers table(I insert some data):


Now create a table employers logs:


Now for creating trigger we need to go to employers  follow steps below:


After clicking trigger button add a trigger and follow steps below:


And that's it. After updating every value you will now see the previous history.











Post a Comment (0)
Previous Post Next Post