Question : How to get last inserted row id from wordpress database?
Answered by : loreto
global $wpdb;
/** insert query here with $wpdb**/
/** insert query here with $wpdb**/ $lastId = $wpdb->insert_id; //This is last insert id
Source : | Last Update : Thu, 20 May 21