I'm trying to create a log of changes in a given table in a database. To do this, I'm going to get the info about all the fields in the original table and create a new one using a function.
In addition to the fields in the original table, the new table should contain the time of the change, the type of the change (insert, delete, update) and an identification of the user that made the change.
I've figured out where I can get the information about the columns of the original table in MySQL (table INFORMATION_SCHEMA.Columns), but I don't know where I can find the information related to the user.
Can anyone please point me in the right direction?