[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/z3950/server zed-koha-server.pl [rel_2_2]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/z3950/server zed-koha-server.pl [rel_2_2] |
Date: |
Mon, 26 Mar 2007 14:59:08 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Antoine Farnault <toins> 07/03/26 14:59:08
Modified files:
z3950/server : zed-koha-server.pl
Log message:
missing SQL keyword "DISTINCT" on the select query.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/server/zed-koha-server.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.4.2.2&r2=1.4.2.3
Patches:
Index: zed-koha-server.pl
===================================================================
RCS file: /sources/koha/koha/z3950/server/Attic/zed-koha-server.pl,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -b -r1.4.2.2 -r1.4.2.3
--- zed-koha-server.pl 2 Aug 2006 12:46:40 -0000 1.4.2.2
+++ zed-koha-server.pl 26 Mar 2007 14:59:08 -0000 1.4.2.3
@@ -145,7 +145,7 @@
print "$term\n";
print "The query was:\n";
print "$query\n";
- my $sql_query = "SELECT marc_biblio.bibid FROM marc_biblio
RIGHT JOIN biblioitems ON marc_biblio.biblionumber = biblioitems.biblionumber
WHERE biblioitems.isbn LIKE ?";
+ my $sql_query = "SELECT DISTINCT marc_biblio.bibid FROM
marc_biblio RIGHT JOIN biblioitems ON marc_biblio.biblionumber =
biblioitems.biblionumber WHERE biblioitems.isbn LIKE ?";
&run_query($sql_query, $query, $args);
}
@@ -174,7 +174,7 @@
$query =~ s| |%|g;
$query .= "\%"; ## Add the wildcard to search term
print "$query\n";
- my $sql_query = "SELECT marc_biblio.bibid FROM marc_biblio
RIGHT JOIN biblio ON marc_biblio.biblionumber = biblio.biblionumber WHERE
biblio.author LIKE ?";
+ my $sql_query = "SELECT DISTINCT marc_biblio.bibid FROM
marc_biblio RIGHT JOIN biblio ON marc_biblio.biblionumber = biblio.biblionumber
WHERE biblio.author LIKE ?";
&run_query($sql_query, $query, $args);
## used for debugging--works!
## print "@bib_list\n";
@@ -208,7 +208,7 @@
print "$term\n";
print "The query was:\n";
print "$query\n";
- my $sql_query = "SELECT marc_biblio.bibid FROM marc_biblio
RIGHT JOIN biblio ON marc_biblio.biblionumber = biblio.biblionumber WHERE
biblio.title LIKE ?";
+ my $sql_query = "SELECT DISTINCT marc_biblio.bibid FROM
marc_biblio RIGHT JOIN biblio ON marc_biblio.biblionumber = biblio.biblionumber
WHERE biblio.title LIKE ?";
&run_query($sql_query, $query, $args);
}
elsif (/1=21/) { ## subject
@@ -233,7 +233,7 @@
$query .= "\%"; ## Add the wildcard to search term
print "$query\n";
- my $sql_query = "SELECT marc_biblio.bibid FROM marc_biblio
RIGHT JOIN biblio ON marc_biblio.biblionumber = biblio.biblionumber WHERE
biblio.subject LIKE ?";
+ my $sql_query = "SELECT DISTINCT marc_biblio.bibid FROM
marc_biblio RIGHT JOIN biblio ON marc_biblio.biblionumber = biblio.biblionumber
WHERE biblio.subject LIKE ?";
&run_query($sql_query, $query, $args);
}
else {
@@ -259,7 +259,7 @@
$query .= "\%"; ## Add the wildcard to search term
print "Querying : $query\n";
- my $sql_query = "SELECT bibid FROM marc_word WHERE word LIKE ?";
+ my $sql_query = "SELECT DISTINCT bibid FROM marc_word WHERE
word LIKE ?";
&run_query($sql_query, $query, $args);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/z3950/server zed-koha-server.pl [rel_2_2],
Antoine Farnault <=