[Koha-cvs] koha/C4 Search.pm [rel_2_2]

Ryan Higgins rch at liblime.com
Mon Jan 29 04:18:19 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Ryan Higgins <rych>	07/01/29 03:18:19

Modified files:
	C4             : Search.pm 

Log message:
	mysql 5 syntax changes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.99.2.15&r2=1.99.2.16

Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.15
retrieving revision 1.99.2.16
diff -u -b -r1.99.2.15 -r1.99.2.16
--- Search.pm	13 Sep 2006 16:34:28 -0000	1.99.2.15
+++ Search.pm	29 Jan 2007 03:18:19 -0000	1.99.2.16
@@ -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.16 $' =~ /\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;





More information about the Koha-cvs mailing list