Utilisez le LAST_INSERT_ID() fonction : update table whatever set product_id = id where id = last_insert_id()