Make WordPress Core


Ignore:
Timestamp:
03/24/2012 03:24:31 PM (13 years ago)
Author:
nacin
Message:

Introduce $wpdb->delete(). props justindgivens, scribu. fixes #18948.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/meta.php

    r19712 r20287  
    490490
    491491        // Run the query, will return true if deleted, false otherwise
    492         $result = (bool) $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE $id_column = %d LIMIT 1;", $meta_id ) );
     492        $result = (bool) $wpdb->delete( $table, array( $id_column => $meta_id ) );
    493493
    494494        // Clear the caches.
Note: See TracChangeset for help on using the changeset viewer.