Last inserted id

You can find last inserted mysql id using WordPress wpdb Class:

global $wpdb;
$last_insert_id = $wpdb->insert_id;

Leave a Reply

Your email address will not be published. Required fields are marked *