Get last inserted row ID from WordPress database using

$lastid = $wpdb->insert_id;

added after the insert query

Source: https://stackoverflow.com/questions/1576018/how-to-get-last-inserted-row-id-from-wordpress-database

Comments

Leave a Reply