WordPress.org

Make WordPress Core


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

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

File:
1 edited

Legend:

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

    r20127 r20287  
    989989    }
    990990
    991     if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) )
     991    if ( ! $wpdb->delete( $wpdb->comments, array( 'comment_ID' => $comment_id ) ) )
    992992        return false;
    993993    do_action('deleted_comment', $comment_id);
Note: See TracChangeset for help on using the changeset viewer.