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

(-)a/C4/Biblio.pm (-3 / +5 lines)
Lines 1073-1085 sub GetBiblio { Link Here
1073
sub GetBiblioItemInfosOf {
1073
sub GetBiblioItemInfosOf {
1074
    my @biblioitemnumbers = @_;
1074
    my @biblioitemnumbers = @_;
1075
1075
1076
    my $query = '
1076
    my $biblioitemnumber_values = @biblioitemnumbers ? join( ',', @biblioitemnumbers ) : "''";
1077
1078
    my $query = "
1077
        SELECT biblioitemnumber,
1079
        SELECT biblioitemnumber,
1078
            publicationyear,
1080
            publicationyear,
1079
            itemtype
1081
            itemtype
1080
        FROM biblioitems
1082
        FROM biblioitems
1081
        WHERE biblioitemnumber IN (' . join( ',', @biblioitemnumbers ) . ')
1083
        WHERE biblioitemnumber IN ($biblioitemnumber_values)
1082
    ';
1084
    ";
1083
    return get_infos_of( $query, 'biblioitemnumber' );
1085
    return get_infos_of( $query, 'biblioitemnumber' );
1084
}
1086
}
1085
1087
(-)a/C4/Items.pm (-4 / +5 lines)
Lines 1145-1155 sub GetItemsCount { Link Here
1145
sub GetItemInfosOf {
1145
sub GetItemInfosOf {
1146
    my @itemnumbers = @_;
1146
    my @itemnumbers = @_;
1147
1147
1148
    my $query = '
1148
    my $itemnumber_values = @itemnumbers ? join( ',', @itemnumbers ) : "''";
1149
1150
    my $query = "
1149
        SELECT *
1151
        SELECT *
1150
        FROM items
1152
        FROM items
1151
        WHERE itemnumber IN (' . join( ',', @itemnumbers ) . ')
1153
        WHERE itemnumber IN ($itemnumber_values)
1152
    ';
1154
    ";
1153
    return get_infos_of( $query, 'itemnumber' );
1155
    return get_infos_of( $query, 'itemnumber' );
1154
}
1156
}
1155
1157
1156
- 

Return to bug 12522