View | Details | Raw Unified | Return to bug 7955
Collapse All | Expand All

(-)a/C4/Members/Statistics.pm (-2 / +5 lines)
Lines 50-56 sub construct_query { Link Here
50
    my $fields = C4::Context->preference('StatisticsFields') || 'location|itype|ccode';
50
    my $fields = C4::Context->preference('StatisticsFields') || 'location|itype|ccode';
51
    my @select_fields = split '\|', $fields;
51
    my @select_fields = split '\|', $fields;
52
    my $query = "SELECT COUNT(*) as count_$count";
52
    my $query = "SELECT COUNT(*) as count_$count";
53
    $query .= ", " . C4::Context->dbh->quote( $_ ) for @select_fields;
53
    for my $field ( @select_fields ) {
54
        $field = C4::Context->dbh->quote( $field );
55
        $field =~ s/^'(.*)'$/$1/;
56
        $query .= ", $field";
57
    }
54
58
55
    $query .= " " . $subquery;
59
    $query .= " " . $subquery;
56
60
57
- 

Return to bug 7955