get_post_id(); return $wpdb->get_var("SELECT comment_count FROM $wpdb->posts WHERE ID = '$post_id'"); } function get_poll_comments($poll) { global $wpdb; $post_id = (int)$poll->get_post_id(); return $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved != 'spam' ORDER BY comment_date"); } ?>