blasterstudios
Technical User
I am trying to create a new record in a users table. At the same time, I want to insert 2 of the values into a different table. At the same time, I want to get the id (which is an auto-increment field) of the new user and insert it along with 2 other fields into the 2nd table. Is it possible to find out what ID is being inserted?
An idea was to just run a query after it's done inserting the first record and sort it DESCending by ID and the highest one will be the newest one. Anybody see any problems with that or know of a better way?
An idea was to just run a query after it's done inserting the first record and sort it DESCending by ID and the highest one will be the newest one. Anybody see any problems with that or know of a better way?