[wp-trac] [WordPress Trac] #18948: Introduce $wpdb->delete()

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 20 20:02:19 UTC 2011


#18948: Introduce $wpdb->delete()
-----------------------------+-----------------------------
 Reporter:  scribu           |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Database         |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch early  |
-----------------------------+-----------------------------

Comment (by scribu):

 The quotes around the table name are not necessary:

 {{{
 $wpdb->delete( "$wpdb->usermeta",
 }}}

 should be

 {{{
 $wpdb->delete( $wpdb->usermeta,
 }}}

 This goes for all queries.

 Also, this line is really hard to follow:

 {{{
 $form = ( $form = array_shift( $where_formats ) ) ? $form :
 $where_format[0];
 }}}

 Please split it up into an assignment and a normal if.

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


More information about the wp-trac mailing list