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

(-)a/C4/RotatingCollections.pm (-22 lines)
Lines 51-77 BEGIN { Link Here
51
    );
51
    );
52
}
52
}
53
53
54
=head2 isItemInThisCollection
55
56
  $inCollection = isItemInThisCollection( $itemnumber, $colId );
57
58
=cut
59
60
sub isItemInThisCollection {
61
    my ( $itemnumber, $colId ) = @_;
62
63
    my $dbh = C4::Context->dbh;
64
65
    my $sth = $dbh->prepare(
66
"SELECT COUNT(*) as inCollection FROM collections_tracking WHERE itemnumber = ? AND colId = ?"
67
    );
68
    $sth->execute( $itemnumber, $colId ) or return (0);
69
70
    my $row = $sth->fetchrow_hashref;
71
72
    return $$row{'inCollection'};
73
}
74
75
=head2 isItemInAnyCollection
54
=head2 isItemInAnyCollection
76
55
77
$inCollection = isItemInAnyCollection( $itemnumber );
56
$inCollection = isItemInAnyCollection( $itemnumber );
78
- 

Return to bug 18606