WordPress.org

Support

Support » How-To and Troubleshooting » How to get query error code whit $wpdb

How to get query error code whit $wpdb

  • Is there any way to get, after a query error such as “duplicate key” etc, the error code ( not string ) using the global variable $wpdb?

    For example, the error code for Duplicate entry 'x' for key y is 1062: this is the number i need.

    Thanks 🙂

  • The topic ‘How to get query error code whit $wpdb’ is closed to new replies.