[Koha-cvs] CVS: koha thesaurus_popup.pl,1.8,1.9

Paul POULAIN tipaul at users.sourceforge.net
Tue Jan 28 15:57:37 CET 2003


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv6821

Modified Files:
	thesaurus_popup.pl 
Log Message:
fixing wrong sql query (use of ?)

Index: thesaurus_popup.pl
===================================================================
RCS file: /cvsroot/koha/koha/thesaurus_popup.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** thesaurus_popup.pl	12 Dec 2002 16:33:58 -0000	1.8
--- thesaurus_popup.pl	28 Jan 2003 14:57:33 -0000	1.9
***************
*** 74,79 ****
  if ($search_string) {
  #	my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where freelib like '".$search_string."%' and category ='$category'");
! 	my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where match (category,freelib) AGAINST ('$search_string') and category ='$category'");
! 		$sti->execute;
  	while (my $line=$sti->fetchrow_hashref) {
  		$stdlib{$line->{'id'}} = "$line->{'freelib'}";
--- 74,79 ----
  if ($search_string) {
  #	my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where freelib like '".$search_string."%' and category ='$category'");
! 	my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where match (category,freelib) AGAINST (?) and category ='$category'");
! 	$sti->execute($search_string);
  	while (my $line=$sti->fetchrow_hashref) {
  		$stdlib{$line->{'id'}} = "$line->{'freelib'}";





More information about the Koha-cvs mailing list