is in the picture after it calls the add method to perform the first SQL statement, this statement will have a on the primary key, how to use the above article 2 insert statement again insert statement execution after get on the primary key value? I call like that is wrong, ask good intention person to help meCodePudding user response:
An insert tag just write a SQL!CodePudding user response:
You can use the SELECT LAST_INSERT_ID () find out the latest on the idCodePudding user response:
Divided into two methods, the first method calls the first SQL access on the id to the second method performs, separated execution and execution are two SQL executionCodePudding user response:
An insert can only write a SQLLike this:
