FlyingIsFun1217 Posted January 1, 2009 Share Posted January 1, 2009 Hey! Hopefully I was able to sum it up fairly well with the title: I need to figure out a way to insert values into a table, giving NULL for one field that has auto_increment as a property, and then find what value was given to the field with the auto_increment field, so that I can use it in later operations. Thanks! FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/139097-solved-get-auto_increment-value-from-new-insert/ Share on other sites More sharing options...
mwasif Posted January 1, 2009 Share Posted January 1, 2009 Use LAST_INSERT_ID() in MySQL and mysql_insert_id() if you are using PHP to insert records into MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/139097-solved-get-auto_increment-value-from-new-insert/#findComment-727510 Share on other sites More sharing options...
FlyingIsFun1217 Posted January 1, 2009 Author Share Posted January 1, 2009 Perfect! Exactly what I was looking for! Thanks! FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/139097-solved-get-auto_increment-value-from-new-insert/#findComment-727523 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.