[wp-trac] Re: [WordPress Trac] #7171: wpdb::insert() & wpdb::update() need to allow typecasting of params.

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 5 03:05:14 GMT 2008


#7171: wpdb::insert() & wpdb::update() need to allow typecasting of params.
------------------------------------------+---------------------------------
 Reporter:  DD32                          |        Owner:  westi   
     Type:  enhancement                   |       Status:  assigned
 Priority:  normal                        |    Milestone:  2.8     
Component:  Administration                |      Version:  2.6     
 Severity:  normal                        |   Resolution:          
 Keywords:  dev-feedback has-patch early  |  
------------------------------------------+---------------------------------
Changes (by DD32):

  * keywords:  dev-feedback => dev-feedback has-patch early

Comment:

 > attachment 7171.diff added.
  * Auto prepares insert() and update() queries
  * Caches table column types upon query, and uses them later on to
 determine the sprintf token to use
    * Loads any columns from the DB needed if they're not allready loaded.
  * No changes to calling of insert() / update() needed, Just ensure data
 is passed non-sql-escaped.

  * Code modified from a version of another app i'm developing off
 BackPress, So i've tested it over the past few weeks with 0 problems.

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


More information about the wp-trac mailing list