Is there any way to access the id of the auto increment for use inside the query.
for instance Wordpress puts the id of the insert in the GUID of the same row, is there any way i can access the id that the row will take during the insertion.
Or maybe there is some quick way for me to find out what the current AI counter is at, so I know what the one going in will be?
I need this because I am trying to backfill the WP posts table into a new custom post type I am using, and I need to have the id of the insert to put inside the GUID column.
Maybe the mysql LAST_INSERT_ID() function can help you. http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With