I’m subsequently inserting a single record in two tables. With the first insert i put the record in the main table, where the primary key value gets generated. Now i need to put some fields of this record in another table including the key value of the main table. How do i do this?
I’m subsequently inserting a single record in two tables. With the first insert i
Share
‘
SELECT LAST_INSERT_ID();‘ will return the last autoincrement ID generated.