I have a MySQL table with next fields:
id int(11) primary auto_increment
data(text)
user varchar(20)
date text
I have a web based UI with php, where I show the data(data,user and date), and people can add or delete data as well. The results are seen into the table properly.
Now I want to implement a history somehow. So, if I deleted for instance a row one time, I want this to be seen in a lets say ‘history’ sql table. I want to store all the events(add or delete) by user and date ofcourse, that’s all.
How should I approach this?
I actually made my own “history” now. I created another table just for history entries and wrote another function (php) that performs every time that someone adds/deletes something and writes data into the pre-created table. Then I just show the data in a “History” page and it works well enough.