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

(-)a/C4/Creators/Lib.pm (-2 / +1 lines)
Lines 151-157 sub _build_query { Link Here
151
        $query .= ' WHERE 1 ';
151
        $query .= ' WHERE 1 ';
152
        while ( my ( $field, $values ) = each %{ $params->{filters} } ) {
152
        while ( my ( $field, $values ) = each %{ $params->{filters} } ) {
153
            if ( ref( $values ) ) {
153
            if ( ref( $values ) ) {
154
                $query .= " AND $field IN ( " . ( ('?') x scalar( @$values ) ) . " ) ";
154
                $query .= " AND $field IN ( " . ( ('?,') x (@$values-1) ) . "? ) "; # a comma separates elements in a list...
155
                push @where_args, @$values;
155
                push @where_args, @$values;
156
            } else {
156
            } else {
157
                $query .= " AND $field = ? ";
157
                $query .= " AND $field = ? ";
158
- 

Return to bug 18044