[wp-trac] [WordPress Trac] #11622: switch to PDO::prepare when we require PHP 5.1

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 30 14:26:48 UTC 2009


#11622: switch to PDO::prepare when we require PHP 5.1
-------------------------+--------------------------------------------------
 Reporter:  sirzooro     |       Owner:  ryan                    
     Type:  enhancement  |      Status:  new                     
 Priority:  normal       |   Milestone:  Future Release          
Component:  Database     |     Version:  2.9                     
 Severity:  normal       |    Keywords:  needs-patch dev-feedback
-------------------------+--------------------------------------------------

Comment(by josephscott):

 The hardest part of achieving database independence would not be helped at
 all by using PDO.  From the PDO PHP intro page -
 http://us.php.net/manual/en/intro.pdo.php

 {{{
 PDO provides a data-access abstraction layer, which means that, regardless
 of which database you're using, you use the same functions to issue
 queries and fetch data. PDO does not provide a database abstraction; it
 doesn't rewrite SQL or emulate missing features. You should use a full-
 blown abstraction layer if you need that facility.
 }}}

 If you were really looking for a library to provide database independence
 there have been other options for quite some time.

 The additional round trip requests to the DB to process the prepared
 statement would not be desirable though.  I'd consider that enough to nix
 the idea of using real  mysqli prepared statements.

 I'm curious about the suggestion that the query planner would do poorly
 with prepared statements.  Any there any references to this actually being
 the case?

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


More information about the wp-trac mailing list