Edit two fields from different tables in a query

0

One question, I opened some way that when I edit a specific field of a table, at the time I edit another field in another (Database = Mysql), since I have a date type field and I need that when I modify in special that field I edit another field in a different table.

I have tried to make a condition that when the update of the specific field is successful I edit the other field, only I do not know how to do it.

I appreciate your answers.

    
asked by O.Eduard 24.01.2018 в 15:26
source

1 answer

0

I think it's better that you do it in the backend (PHP), since you are evaluating if a specific field was modified. To make two inserts, you can do it through a transaction that starts with BEGIN and ends with COMMIT. Anyway, check this answer , maybe you'll have what you're looking for.

    
answered by 24.01.2018 в 16:50