Lines 1036-1043
sub GetBestRecordMatch {
Link Here
|
1036 |
my $dbh = C4::Context->dbh; |
1036 |
my $dbh = C4::Context->dbh; |
1037 |
my $sth = $dbh->prepare("SELECT candidate_match_id |
1037 |
my $sth = $dbh->prepare("SELECT candidate_match_id |
1038 |
FROM import_record_matches |
1038 |
FROM import_record_matches |
1039 |
JOIN biblio ON ( candidate_match_id = biblionumber ) |
1039 |
JOIN import_records ON ( import_record_matches.import_record_id = import_records.import_record_id ) |
1040 |
WHERE import_record_id = ? |
1040 |
LEFT JOIN biblio ON ( candidate_match_id = biblio.biblionumber ) |
|
|
1041 |
LEFT JOIN auth_header ON ( candidate_match_id = auth_header.authid ) |
1042 |
WHERE import_record_matches.import_record_id = ? AND |
1043 |
( (import_records.record_type = 'biblio' AND biblio.biblionumber IS NOT NULL) OR |
1044 |
(import_records.record_type = 'auth' AND auth_header.authid IS NOT NULL) ) |
1041 |
ORDER BY score DESC, candidate_match_id DESC"); |
1045 |
ORDER BY score DESC, candidate_match_id DESC"); |
1042 |
$sth->execute($import_record_id); |
1046 |
$sth->execute($import_record_id); |
1043 |
my ($record_id) = $sth->fetchrow_array(); |
1047 |
my ($record_id) = $sth->fetchrow_array(); |
1044 |
- |
|
|