[Koha-cvs] CVS: koha/C4 Search.pm,1.58,1.59
Paul POULAIN
tipaul at users.sourceforge.net
Mon Mar 3 18:36:37 CET 2003
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv15413/C4
Modified Files:
Search.pm
Log Message:
migrating to prepare (?) execute($var) structure
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** Search.pm 27 Feb 2003 16:52:02 -0000 1.58
--- Search.pm 3 Mar 2003 17:36:32 -0000 1.59
***************
*** 2129,2133 ****
my $dbh = C4::Context->dbh;
my $query="Select * from items,branches where
! biblionumber=$bibnum and items.holdingbranch=branches.branchcode";
if ($type ne 'intra'){
$query.=" and ((itemlost <>1 and itemlost <> 2) or itemlost is NULL) and
--- 2129,2133 ----
my $dbh = C4::Context->dbh;
my $query="Select * from items,branches where
! biblionumber=? and items.holdingbranch=branches.branchcode";
if ($type ne 'intra'){
$query.=" and ((itemlost <>1 and itemlost <> 2) or itemlost is NULL) and
***************
*** 2136,2140 ****
my $sth=$dbh->prepare($query);
# print $query;
! $sth->execute;
my %counts;
$counts{'total'}=0;
--- 2136,2140 ----
my $sth=$dbh->prepare($query);
# print $query;
! $sth->execute($bibnum);
my %counts;
$counts{'total'}=0;
***************
*** 2175,2182 ****
$counts{$status}++;
}
! my $query2="Select * from aqorders where biblionumber=$bibnum and
datecancellationprinted is NULL and quantity > quantityreceived";
my $sth2=$dbh->prepare($query2);
! $sth2->execute;
if (my $data=$sth2->fetchrow_hashref){
$counts{'order'}=$data->{'quantity'} - $data->{'quantityreceived'};
--- 2175,2182 ----
$counts{$status}++;
}
! my $query2="Select * from aqorders where biblionumber=? and
datecancellationprinted is NULL and quantity > quantityreceived";
my $sth2=$dbh->prepare($query2);
! $sth2->execute($bibnum);
if (my $data=$sth2->fetchrow_hashref){
$counts{'order'}=$data->{'quantity'} - $data->{'quantityreceived'};
More information about the Koha-cvs
mailing list