Versuchen Sie Folgendes:
INSERT INTO table_a SET name=:name, age=:age, sex=:sex; INSERT INTO table_b SET a_id=LAST_INSERT_ID(), type=:type;
Versuchen Sie Folgendes:
INSERT INTO table_a SET name=:name, age=:age, sex=:sex; INSERT INTO table_b SET a_id=LAST_INSERT_ID(), type=:type;