[wp-trac] [WordPress Trac] #27703: Need additional db version information in WP3.9+

WordPress Trac noreply at wordpress.org
Tue Apr 8 05:03:29 UTC 2014


#27703: Need additional db version information in WP3.9+
-------------------------+-----------------------------
 Reporter:  webaware     |       Owner:  pento
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  Future Release
Component:  Database     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  administration
-------------------------+-----------------------------

Comment (by webaware):

 NB: because WP pre-3.9 doesn't have the `use_mysqli` property, you need to
 test the WP version before testing that property. e.g.

 {{{#!php
 global $wpdb, $wp_version;
 if ( version_compare( $wp_version, '3.8.9999', '>' ) && $wpdb->use_mysqli
 ) {
     $info = mysqli_get_server_info( $wpdb->dbh );
 }
 else {
     $info = mysql_get_server_info();
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27703#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list