[wp-trac] [WordPress Trac] #11318: $wpdb->prepare() Chokes on LIKE conditions?

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 28 23:50:44 UTC 2009


#11318: $wpdb->prepare() Chokes on LIKE conditions?
--------------------------+-------------------------------------------------
 Reporter:  miqrogroove   |        Owner:  ryan      
     Type:  defect (bug)  |       Status:  closed    
 Priority:  normal        |    Milestone:            
Component:  Database      |      Version:  2.8.4     
 Severity:  normal        |   Resolution:  worksforme
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by miqrogroove):

 Having participated in hakre's thread, the 2 patterns offered by dd32
 above and mine above are all looking undesirable for my own code.  I've
 dropped my instances of prepare() and substituted the good old
 $wpdb->_real_escape() pattern.  It works with my queries, and I know it's
 faster and more secure than $wpdb->prepare().  It became the obvious,
 simple solution.

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


More information about the wp-trac mailing list