X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FMatcher.pm;h=d61964ce2037b0348582e9a96f09ab34871ec64f;hb=d06c2319828608071f135759b662f5899f8c4a61;hp=9d1df67e585063ece52156298821d8039664f6d5;hpb=8307a1f79d8143e05c734cc750bb420c1ff41e1c;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