If you're inserting a new record into a table where the id auto increments, is there a way to automatically grab that ID value somehow, without performing a second query based on other parameters?
For example, a scenario in which a new record is inserted and that record also needs its ID recorded in another table simultaneously. I can do a query to get the ID after the first query is performed, and then insert it with another query of course, but I was wondering if there's some way to grab and shorten the process.
Thanks,
shaBANG
For example, a scenario in which a new record is inserted and that record also needs its ID recorded in another table simultaneously. I can do a query to get the ID after the first query is performed, and then insert it with another query of course, but I was wondering if there's some way to grab and shorten the process.
Thanks,
shaBANG