X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FMatcher.pm;h=d61964ce2037b0348582e9a96f09ab34871ec64f;hb=72f91afd9c7871b706d553cfbadf23d4f6db7e02;hp=9d1df67e585063ece52156298821d8039664f6d5;hpb=ef8171ba425f766b67d9e139194b6a8d570e301e;p=koha_gimpoz diff --git a/C4/Matcher.pm b/C4/Matcher.pm index 9d1df67e58..d61964ce20 100644 --- a/C4/Matcher.pm +++ b/C4/Matcher.pm @@ -95,6 +95,22 @@ sub GetMatcherList { return @results; } +=head2 GetMatcherId + + my $matcher_id = C4::Matcher::GetMatcherId($code); + +Returns the matcher_id of a code. + +=cut + +sub GetMatcherId { + my ($code) = @_; + my $dbh = C4::Context->dbh; + + my $matcher_id = $dbh->selectrow_array("SELECT matcher_id FROM marc_matchers WHERE code = ?", undef, $code); + return $matcher_id; +} + =head1 METHODS =head2 new