Skip to:
Content

bbPress.org

Changes between Initial Version and Version 1 of Ticket #3083, comment 1


Ignore:
Timestamp:
03/08/2017 11:55:41 PM (8 years ago)
Author:
januzi_pl
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3083, comment 1

    initial v1  
    44
    55{{{
    6 $voices = $wpdb->get_col( $wpdb->prepare( "select sum( number ) from ( SELECT ( DISTINCT post_author ) FROM {$wpdb->posts} WHERE ( post_parent = %d AND post_status = '%s' AND post_type = '%s' ) as s1 ) union  ( SELECT ( DISTINCT post_author ) FROM {$wpdb->posts} WHERE ( ID = %d AND post_type = '%s' ) as s2 );", $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type(), $topic_id, bbp_get_topic_post_type() ) );
     6$voices = $wpdb->get_col( $wpdb->prepare( "select sum( number ) from ( SELECT ( DISTINCT post_author ) as number FROM {$wpdb->posts} WHERE ( post_parent = %d AND post_status = '%s' AND post_type = '%s' ) as s1 ) union  ( SELECT ( DISTINCT post_author ) as number FROM {$wpdb->posts} WHERE ( ID = %d AND post_type = '%s' ) as s2 );", $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type(), $topic_id, bbp_get_topic_post_type() ) );
    77}}}
    88