Bug 18044: Label Batches not displaying
SQL expects lists to be comma separated. A trailing comma must also be avoided. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
4740438b41
commit
544cf17d6f
1 changed files with 1 additions and 1 deletions
|
@ -151,7 +151,7 @@ sub _build_query {
|
|||
$query .= ' WHERE 1 ';
|
||||
while ( my ( $field, $values ) = each %{ $params->{filters} } ) {
|
||||
if ( ref( $values ) ) {
|
||||
$query .= " AND $field IN ( " . ( ('?') x scalar( @$values ) ) . " ) ";
|
||||
$query .= " AND $field IN ( " . ( ('?,') x (@$values-1) ) . "? ) "; # a comma separates elements in a list...
|
||||
push @where_args, @$values;
|
||||
} else {
|
||||
$query .= " AND $field = ? ";
|
||||
|
|
Loading…
Reference in a new issue