Title: Question about $wpdb-&gt;insert_id;
Last modified: August 20, 2016

---

# Question about $wpdb->insert_id;

 *  [alexandreuti](https://wordpress.org/support/users/alexandreuti/)
 * (@alexandreuti)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/question-about-wpdb-insert_id/)
 * I’m inserting into 2 tables: tabela01 and tabela02 follows
    1) I insert the function
   tabela01 aravés $ wpdb-> query ($ wpdb-> prepare (…)) 2) Recupero the id with
   the $ wpdb-> insert_id; 3) I insert in tabela02 with id retrieved in Step 2.
 * My question is: in insertion operations competitors run the risk of retrieving
   the id wrong in the 2nd step?

The topic ‘Question about $wpdb->insert_id;’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [alexandreuti](https://wordpress.org/support/users/alexandreuti/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/question-about-wpdb-insert_id/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
