Changyan_Synchronizer::isCommentExits PHP 메소드

isCommentExits() 개인적인 메소드

to check if this comment is in the wpdb
private isCommentExits ( $post_id, $comment_author, $comment_content, $date_gmt )
    private function isCommentExits($post_id, $comment_author, $comment_content, $date_gmt)
    {
        global $wpdb;
        $comment = $wpdb->get_results($wpdb->prepare("SELECT comment_ID FROM {$wpdb->comments}\r\n                    WHERE  comment_post_ID = %s\r\n                    AND comment_content = %s\r\n                    AND comment_date_gmt = %s\r\n                    AND comment_author = %s", $post_id, stripslashes($comment_content), $date_gmt, $comment_author));
        if (is_array($comment) && !empty($comment)) {
            return true;
        } else {
            return false;
        }
    }