[wp-trac] Re: [WordPress Trac] #6836: Prepare queries using INSERT/UPDATE should use wpdb::insert() or wpdb::update()

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 11 09:19:30 GMT 2008


#6836: Prepare queries using INSERT/UPDATE should use wpdb::insert() or
wpdb::update()
-------------------------------------+--------------------------------------
 Reporter:  DD32                     |        Owner:  ryan
     Type:  defect                   |       Status:  new 
 Priority:  normal                   |    Milestone:  2.6 
Component:  Administration           |      Version:  2.6 
 Severity:  normal                   |   Resolution:      
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------
Comment (by DD32):

 that could be changed to this to make it more compact:
 {{{
 foreach( (array)$types as $key => $type )
         if( isset($data[$key]) )
                 $data[$key] = sprintf($type, $data[$key]);
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6836#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list