From bb69d41e7b260daf96c6489047f9df78eaaad2b6 Mon Sep 17 00:00:00 2001 From: rangi Date: Wed, 24 Mar 2004 00:36:07 +0000 Subject: [PATCH] Fix for bug 761 Ill commit this to the rel-2-0 branch as well --- C4/Breeding.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index d66dad20ec..9f633d3d25 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -60,7 +60,8 @@ sub ImportBreeding { my $dbh = C4::Context->dbh; my $searchisbn = $dbh->prepare("select biblioitemnumber from biblioitems where isbn=?"); my $searchissn = $dbh->prepare("select biblioitemnumber from biblioitems where issn=?"); - my $searchbreeding = $dbh->prepare("select id from marc_breeding where isbn=?"); + my $searchbreeding = $dbh->prepare("select id from marc_breeding +where isbn=? and title=?"); my $insertsql = $dbh->prepare("insert into marc_breeding (file,isbn,title,author,marc,encoding,z3950random) values(?,?,?,?,?,?,?)"); my $replacesql = $dbh->prepare("update marc_breeding set file=?,isbn=?,title=?,author=?,marc=?,encoding=?,z3950random=? where id=?"); $encoding = C4::Context->preference("marcflavour") unless $encoding; @@ -99,10 +100,10 @@ sub ImportBreeding { # search in breeding farm my $breedingid; if ($oldbiblio->{isbn}) { - $searchbreeding->execute($oldbiblio->{isbn}); + $searchbreeding->execute($oldbiblio->{isbn},$oldbiblio->{title}); ($breedingid) = $searchbreeding->fetchrow; } elsif ($oldbiblio->{issn}){ - $searchbreeding->execute($oldbiblio->{issn}); + $searchbreeding->execute($oldbiblio->{issn},$oldbiblio->{title}); ($breedingid) = $searchbreeding->fetchrow; } if ($breedingid && $overwrite_biblio eq 0) { -- 2.39.5