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 |
- |
|
|