[Koha-cvs] CVS: koha/z3950/server zed-koha-server.pl,1.3,1.4

Joshua Ferraro joshferraro at users.sourceforge.net
Thu Jun 3 03:48:21 CEST 2004


Update of /cvsroot/koha/koha/z3950/server
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11472

Modified Files:
	zed-koha-server.pl 
Log Message:
Fixes discrepency between bibid and biblionumber.  Thanks to Tomasz Wolniewicz for 
suggesting this elegent solution.


Index: zed-koha-server.pl
===================================================================
RCS file: /cvsroot/koha/koha/z3950/server/zed-koha-server.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** zed-koha-server.pl	23 Apr 2004 01:15:52 -0000	1.3
--- zed-koha-server.pl	3 Jun 2004 01:48:19 -0000	1.4
***************
*** 20,25 ****
  #-----------------------------------
  # Script Name: zed-koha-server.pl
! # Script Version: 1.3
! # Date:  2004/04/14
  # Author:  Joshua Ferraro [jmf at kados dot org]
  # Description: A very basic Z3950 Server 
--- 20,25 ----
  #-----------------------------------
  # Script Name: zed-koha-server.pl
! # Script Version: 1.4
! # Date:  2004/06/02
  # Author:  Joshua Ferraro [jmf at kados dot org]
  # Description: A very basic Z3950 Server 
***************
*** 36,40 ****
  #    			 Added support for the truncation attribute (5=1 and
  #    			 5=100; thanks to Tomasz M. Wolniewicz for pointing
! #    			 out these improvements) 
  #-----------------------------------
  # Note: After installing SimpleServer (indexdata.dk/simpleserver) and 
--- 36,44 ----
  #    			 Added support for the truncation attribute (5=1 and
  #    			 5=100; thanks to Tomasz M. Wolniewicz for pointing
! #    			 out these improvements)
! #    1.4.0 2004/06/02:  Changed sql queries to account for the difference 
! #    			 between bibid and biblionumber.  Thanks again to 
! #    			 Tomasz M. Wolniewicz for suggesting a great solution
! #    			 to this problem.
  #-----------------------------------
  # Note: After installing SimpleServer (indexdata.dk/simpleserver) and 
***************
*** 70,74 ****
  	# FIXME: I should force use of my database name 
          $args->{IMP_NAME} = "Zed-Koha";
!         $args->{IMP_VER} = "0.02";
          $args->{ERR_CODE} = 0;
          $args->{HANDLE} = $session;
--- 74,78 ----
  	# FIXME: I should force use of my database name 
          $args->{IMP_NAME} = "Zed-Koha";
!         $args->{IMP_VER} = "1.40";
          $args->{ERR_CODE} = 0;
          $args->{HANDLE} = $session;
***************
*** 141,145 ****
  		print "The query was:\n";        
  		print "$query\n";
! 		my $sql_query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ?";
  		&run_query($sql_query, $query, $args);
  
--- 145,149 ----
  		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.isbn LIKE ?";
  		&run_query($sql_query, $query, $args);
  
***************
*** 170,174 ****
  		$query .= "\%";		## Add the wildcard to search term
  		print "$query\n";
! 		my $sql_query = "SELECT biblionumber FROM biblio WHERE author LIKE ?";
                  &run_query($sql_query, $query, $args);
  ## used for debugging--works!
--- 174,178 ----
  		$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 ?";
                  &run_query($sql_query, $query, $args);
  ## used for debugging--works!
***************
*** 204,208 ****
                  print "The query was:\n";
                  print "$query\n";
! 		my $sql_query = "SELECT biblionumber FROM biblio WHERE title LIKE ?";
          	&run_query($sql_query, $query, $args);
  	}
--- 208,212 ----
                  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 ?";
          	&run_query($sql_query, $query, $args);
  	}
***************
*** 229,233 ****
  		$query .= "\%";         ## Add the wildcard to search term
                  print "$query\n";
! 		my $sql_query = "SELECT biblionumber FROM bibliosubject WHERE subject LIKE ?";
                  &run_query($sql_query, $query, $args);
          }
--- 233,237 ----
  		$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 ?";
                  &run_query($sql_query, $query, $args);
          }





More information about the Koha-cvs mailing list