else { $fields = "
$wpdb->comments.comment_ID";
} $post_id =
absint( $this->query_vars
['post_id'
] );
if ( !
empty( $post_id ) ) { $this->sql_clauses
['where'
]['post_id'
] =
$wpdb->
prepare( 'comment_post_ID = %d',
$post_id );
} // Parse comment IDs for an IN clause.
if ( !
empty( $this->query_vars
['comment__in'
] ) ) { $this->sql_clauses
['where'
]['comment__in'
] = "
$wpdb->comments.comment_ID IN ( " .
implode( ',',
wp_parse_id_list( $this->query_vars
['comment__in'
] ) ) . ' )';
} // Parse comment IDs for a NOT IN clause.
if ( !
empty( $this->query_vars
['comment__not_in'
] ) ) { $this->sql_clauses
['where'
]['comment__not_in'
] = "
$wpdb->comments.comment_ID NOT IN ( " .
implode( ',',
wp_parse_id_list( $this->query_vars
['comment__not_in'
] ) ) . ' )';
} // Parse comment parent IDs for an IN clause.
if ( !
empty( $this->query_vars
['parent__in'
] ) ) { $this->sql_clauses
['where'
]['parent__in'
] = 'comment_parent IN ( ' .
implode( ',',
wp_parse_id_list( $this->query_vars
['parent__in'
] ) ) . ' )';
}