I'm inserting a record into the database and the id field is incrementing using auto_increment. My problem is that as soon as I insert a field I want to use the id that was just assigned to that row.
My only thought is to do a look up on the MAX number, but I'm worried that someone might insert another record before the second query is run to get the max number and thus I wouldn't get the correct data.
Any thoughts on how to do this?
Thanks.