Title: How to get last sql error code with $wpdb
Last modified: August 22, 2016

---

# How to get last sql error code with $wpdb

 *  [Jehy](https://wordpress.org/support/users/jehy/)
 * (@jehy)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/how-to-get-last-sql-error-code-with-wpdb/)
 * Hello! I need mysql last error code, not it’s text. How can I get it with wpdb?

The topic ‘How to get last sql error code with $wpdb’ is closed to new replies.

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)
 * [wpdb](https://wordpress.org/support/topic-tag/wpdb/)

 * 0 replies
 * 1 participant
 * Last reply from: [Jehy](https://wordpress.org/support/users/jehy/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/how-to-get-last-sql-error-code-with-wpdb/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
