[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Search.pm [R_2-2-7-1]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/C4 Search.pm [R_2-2-7-1] |
Date: |
Mon, 12 Feb 2007 10:38:36 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: R_2-2-7-1
Changes by: Antoine Farnault <toins> 07/02/12 10:38:36
Modified files:
C4 : Search.pm
Log message:
Commiting BUG FIX for 2.2.7.1.
(mysql 5 syntax changes)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=R_2-2-7-1&r1=1.99.2.15&r2=1.99.2.15.2.1
Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.15
retrieving revision 1.99.2.15.2.1
diff -u -b -r1.99.2.15 -r1.99.2.15.2.1
--- Search.pm 13 Sep 2006 16:34:28 -0000 1.99.2.15
+++ Search.pm 12 Feb 2007 10:38:35 -0000 1.99.2.15.2.1
@@ -30,7 +30,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.99.2.15 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.99.2.15.2.1 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
=head1 NAME
@@ -915,7 +915,7 @@
$query="select *,biblio.author,biblio.biblionumber from
biblio
left join
additionalauthors
- on
additionalauthors.biblionumber =biblio.biblionumber
+ on (
additionalauthors.biblionumber =biblio.biblionumber )
where
((biblio.author like ?
or biblio.author like ? or
additionalauthors.author like ? or additionalauthors.author
@@ -986,7 +986,7 @@
my $i=1;
$query="select
biblio.biblionumber,author,title,unititle,notes,abstract,serial,seriestitle,copyrightdate,timestamp,subtitle
from biblio
left join bibliosubtitle on
-
biblio.biblionumber=bibliosubtitle.biblionumber
+ (
biblio.biblionumber=bibliosubtitle.biblionumber )
where
(((title like ? or title like ?)";
@bind=("$key[0]%","% $key[0]%");
@@ -1302,7 +1302,7 @@
my ($env,$biblionumber,$type) = @_;
my $dbh = C4::Context->dbh;
my $query = "SELECT *,items.notforloan as itemnotforloan FROM items,
biblio, biblioitems
- left join itemtypes on
biblioitems.itemtype = itemtypes.itemtype
+ left join itemtypes on (
biblioitems.itemtype = itemtypes.itemtype )
WHERE items.biblionumber = ?
AND biblioitems.biblioitemnumber =
items.biblioitemnumber
AND biblio.biblionumber =
items.biblionumber";
@@ -1489,13 +1489,14 @@
sub bibdata {
my ($bibnum, $type) = @_;
my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("Select *, biblioitems.notes AS bnotes,
biblio.notes
- from biblio,
biblioitems
- left join
bibliosubtitle on
-
biblio.biblionumber = bibliosubtitle.biblionumber
- left join
itemtypes on biblioitems.itemtype=itemtypes.itemtype
- where
biblio.biblionumber = ?
- and
biblioitems.biblionumber = biblio.biblionumber");
+ my $sth = $dbh->prepare("
+ SELECT * , biblioitems.notes AS bnotes, biblio.notes
+ FROM biblio
+ LEFT JOIN biblioitems ON biblio.biblionumber =
biblioitems.biblionumber
+ LEFT JOIN itemtypes ON biblioitems.itemtype =
itemtypes.itemtype
+ WHERE biblio.biblionumber = ?
+ AND biblioitems.biblionumber = biblio.biblionumber ");
+
$sth->execute($bibnum);
my $data;
$data = $sth->fetchrow_hashref;
@@ -1559,7 +1560,9 @@
sub bibitemdata {
my ($bibitem) = @_;
my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("Select *,biblioitems.notes as bnotes from
biblio, biblioitems,itemtypes where biblio.biblionumber =
biblioitems.biblionumber and biblioitemnumber = ? and biblioitems.itemtype =
itemtypes.itemtype");
+ my $sth = $dbh->prepare("Select *,biblioitems.notes as bnotes from
biblio, biblioitems
+ LEFT JOIN itemtypes on biblioitems.itemtype = itemtypes.itemtype
+ where biblio.biblionumber = biblioitems.biblionumber and
biblioitemnumber = ? ");
my $data;
$sth->execute($bibitem);
@@ -2352,9 +2355,9 @@
itemtypes.*,
MIN(items.itemlost) as itemlost,
MIN(items.dateaccessioned) as dateaccessioned
- FROM biblioitems, itemtypes, items
+ FROM biblioitems, items
+ LEFT JOIN itemtypes ON biblioitems.itemtype =
itemtypes.itemtype
WHERE biblioitems.biblionumber = ?
- AND biblioitems.itemtype =
itemtypes.itemtype
AND biblioitems.biblioitemnumber =
items.biblioitemnumber
GROUP BY items.biblioitemnumber");
my $count = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/C4 Search.pm [R_2-2-7-1],
Antoine Farnault <=