[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:14:05 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):

 Replying to [comment:8 ryan]:
 > insert() and update() don't do prepare().  I would like to pass format
 specifiers to them somehow before moving everything over.

 How about something similar to this:
 {{{
 insert ('test_table', array('ID' => 's', 'post' => 'test'), array('ID' =>
 '%d'));
 creating:
 INSERT INTO test_table (`ID`,`post`) VALUES ('0','test')
 }}}
 (See patch)

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


More information about the wp-trac mailing list