I want to create a trigger which will insert a data into my audit table before updating the 'items' table.
The columns in my table 'items' are (id, name, category, quantity, price_per_item)
What I want is when a one of the Admin users logs into the system and updates items table, then befor update data should get inserted into 'audit' table. The audit table has some additional columns like (updated_by, modified_on, IP address, browser).
These column values are available in my PHP Variables but how can I pass these into my triggers so that when update takes place, trigger will insert the data from 'items' table to 'audit' table.
Your help will be highly appriciated.
Thanks in advance.