I have two tables:
- table1 : with three columns product_id , product_name , product_price ;
- table2 : with four columns tag_name , product_id , tag_name , tag_name li>
I've created a new table3 : with three columns product_id , old_product , old_post_name
In my application I have a php script that will make a UPDATE in the 1 and 2 precisely in the columns preco_produto and preco_marca .
I would like to create a TRIGGER in order to save the modified data in tables 1 and 2 in tables3 :
MY LOGIC:
CRIE UM TRIGGER
ANTES DE UPDATE NA TABELA 1 e 2
GUARDE OS ANTIGOS VALORES NA TABELA3
PROBLEM:
How to declare the two tables in trigger ?