[wp-trac] [WordPress Trac] #21663: Use PDO or mysqli for MySQL queries when available

WordPress Trac noreply at wordpress.org
Tue Nov 12 08:35:31 UTC 2013


#21663: Use PDO or mysqli for MySQL queries when available
--------------------------------------------------+------------------
 Reporter:  scottconnerly                         |       Owner:
     Type:  task (blessed)                        |      Status:  new
 Priority:  normal                                |   Milestone:  3.8
Component:  Database                              |     Version:  3.5
 Severity:  normal                                |  Resolution:
 Keywords:  dev-feedback has-patch needs-testing  |
--------------------------------------------------+------------------

Comment (by markoheijnen):

 Replying to [comment:125 kurtpayne]:
 > Replying to [comment:124 wonderboymusic]:
 > > I added a `wpdb_drivers` filter in `wpdb::set_driver()` to allow
 someone to shove another slug in there.
 >
 > This is going to be hard to access.  Plugins and mu-plugins aren't
 loaded until after a database connection is made, so what could set that
 filter?  If this is in core, it would probably only be code in db.php.
 The current plugin on github relies on a constant named WPDB_DRIVER
 (presumably in wp-config.php) if the user wants to pick a particular
 driver.
 >
 > Thoughts?
 >
 > And thanks for adding the patch :-)

 Wouldn't it still be possible if you use the dropin? Since there you still
 need to set the $wpdb variable and when you don't do that WordPress will
 load it's own class.

 And yes thanks for adding the patch.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/21663#comment:127>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list