Insert into the first table entry. It also hangs a trigger "after insert", which adds the id from the first table into the second. How to implement it?
If you insert in the trigger query: INSERT INTO table2 VALUES (table2.id = LAST_INSERT_ID()); — add "1".
If the query is: INSERT INTO table2 VALUES (table2.id = new.id); — "0".