[wp-trac] [WordPress Trac] #41956: Errno in $wpdb

WordPress Trac noreply at wordpress.org
Fri Sep 22 13:30:46 UTC 2017


#41956: Errno in $wpdb
-------------------------+-----------------------------
 Reporter:  LeonN1960    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:  4.8.2
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Since I use referential integrity in my plugin, there will be situation
 that the referential integrity will be violated. But, unfortunately there
 is not a proper way to identify the reason of the violation in
 $wpdb->last_error. It is only text, and could differ in diffenrent
 languages I assume.

 Since Mysqli contains also the errno, would it be possible to also present
 the errno as part of the result. In that case I could check the errorno to
 be 1451 for referential integrity violation.

 In my opinion a usefull enhancement of the WPDB class. If any help needed,
 just contact me

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41956>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list