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

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 3 22:21:28 UTC 2009


#11318: $wpdb->prepare() Chokes on LIKE conditions?
--------------------------+-------------------------------------------------
 Reporter:  miqrogroove   |       Owner:  ryan 
     Type:  defect (bug)  |      Status:  new  
 Priority:  normal        |   Milestone:  3.0  
Component:  Database      |     Version:  2.8.4
 Severity:  normal        |    Keywords:       
--------------------------+-------------------------------------------------
 This might be a documentation issue, but I'm feeling a bit clueless
 tonight after reading
 http://codex.wordpress.org/Function_Reference/wpdb_Class

 {{{
 var_dump($wpdb->prepare("SELECT 1 WHERE col1 LIKE 'image%'"));
 //returns bool(false)
 }}}

 prepare() seems incapable of even the most simple LIKE query syntax.

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


More information about the wp-trac mailing list