koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/reports catalogue_stats.pl,1.10,1.11


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha/reports catalogue_stats.pl,1.10,1.11
Date: Tue, 29 Mar 2005 06:21:39 -0800

Update of /cvsroot/koha/koha/reports
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6556/reports

Modified Files:
        catalogue_stats.pl 
Log Message:
Performance Improvements : Publisher lists and Item Codes becomes free input.

Index: catalogue_stats.pl
===================================================================
RCS file: /cvsroot/koha/koha/reports/catalogue_stats.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** catalogue_stats.pl  9 Mar 2005 16:14:03 -0000       1.10
--- catalogue_stats.pl  29 Mar 2005 14:21:37 -0000      1.11
***************
*** 107,161 ****
        my $count=0;
        my $req;
!       $req = $dbh->prepare("select distinctrow left(dewey,3) from biblioitems 
order by dewey");
        $req->execute;
        my $hasdewey;
        my @select;
!       push @select,"";
        while (my ($value) =$req->fetchrow) {
!               $hasdewey =1 if (($value) and (! $hasdewey));
!               $count++ if (($value) and (! $hasdewey));
!               push @select, $value;
!       }
!       my $CGIdewey=CGI::scrolling_list( -name     => 'Filter',
!                               -id => 'Filter',
!                               -values   => address@hidden,
!                               -size     => 1,
!                               -multiple => 0 );
        
!       $req = $dbh->prepare( "select distinctrow left(lccn,3) from biblioitems 
order by lccn");
        $req->execute;
!       undef @select;
!       push @select,"";
        my $haslccn;
        my $hlghtlccn;
        while (my ($value) =$req->fetchrow) {
                $hlghtlccn = !($hasdewey);
!               $haslccn =1 if (($value) and (! $haslccn));
                $count++ if (($value) and (! $haslccn));
!               push @select, $value;
        }
!       my $CGIlccn=CGI::scrolling_list( -name     => 'Filter',
!                               -id => 'Filter',
!                               -values   => address@hidden,
!                               -size     => 1,
!                               -multiple => 0 );
        
!       $req = $dbh->prepare("select distinctrow left(itemcallnumber,5) from 
items order by itemcallnumber");
        $req->execute;
!       undef @select;
!       push @select,"";
        my $hascote;
        my $hlghtcote;
        while (my ($value) =$req->fetchrow) {
!               $hascote =1 if (($value) and (! $hascote));
                $count++ if (($value) and (! $hascote));
                $hlghtcote = (($hasdewey) and ($haslccn)) or (!($hasdewey) and 
!($haslccn));
!               push @select, $value;
        }
!       my $CGIcote=CGI::scrolling_list( -name     => 'Filter',
!                               -id => 'Filter',
!                               -values   => address@hidden,
!                               -size     => 1,
!                               -multiple => 0 );
        $count++;
        my $hglghtDT =$count % 2;
--- 107,161 ----
        my $count=0;
        my $req;
!       $req = $dbh->prepare("select count(dewey) from biblioitems ");
        $req->execute;
        my $hasdewey;
        my @select;
! #     push @select,"";
        while (my ($value) =$req->fetchrow) {
!               $hasdewey =1 if (($value>2) and (! $hasdewey));
!               $count++ if (($value>2) and (! $hasdewey));
! #             push @select, $value;
!       }
! #     my $CGIdewey=CGI::scrolling_list( -name     => 'Filter',
! #                             -id => 'Filter',
! #                             -values   => address@hidden,
! #                             -size     => 1,
! #                             -multiple => 0 );
        
!       $req = $dbh->prepare( "select count(lccn) from biblioitems ");
        $req->execute;
! #     undef @select;
! #     push @select,"";
        my $haslccn;
        my $hlghtlccn;
        while (my ($value) =$req->fetchrow) {
                $hlghtlccn = !($hasdewey);
!               $haslccn =1 if (($value>2) and (! $haslccn));
                $count++ if (($value) and (! $haslccn));
! #             push @select, $value;
        }
! #     my $CGIlccn=CGI::scrolling_list( -name     => 'Filter',
! #                             -id => 'Filter',
! #                             -values   => address@hidden,
! #                             -size     => 1,
! #                             -multiple => 0 );
        
!       $req = $dbh->prepare("select count(itemcallnumber) from items");
        $req->execute;
! #     undef @select;
! #     push @select,"";
        my $hascote;
        my $hlghtcote;
        while (my ($value) =$req->fetchrow) {
!               $hascote =1 if (($value>2) and (! $hascote));
                $count++ if (($value) and (! $hascote));
                $hlghtcote = (($hasdewey) and ($haslccn)) or (!($hasdewey) and 
!($haslccn));
! #             push @select, $value;
        }
! #     my $CGIcote=CGI::scrolling_list( -name     => 'Filter',
! #                             -id => 'Filter',
! #                             -values   => address@hidden,
! #                             -size     => 1,
! #                             -multiple => 0 );
        $count++;
        my $hglghtDT =$count % 2;
***************
*** 188,203 ****
                                -multiple => 0 );
        
!       $req = $dbh->prepare("select distinctrow left(publishercode,75) from 
biblioitems order by publishercode");
!       $req->execute;
!       undef @select;
!       push @select,"";
!       while (my ($value) =$req->fetchrow) {
!               push @select, $value;
!       }
!       my $CGIpublisher=CGI::scrolling_list( -name     => 'Filter',
!                               -id => 'Filter',
!                               -values   => address@hidden,
!                               -size     => 1,
!                               -multiple => 0 );
  
        undef @select;
--- 188,203 ----
                                -multiple => 0 );
        
! #     $req = $dbh->prepare("select distinctrow left(publishercode,75) from 
biblioitems order by publishercode");
! #     $req->execute;
! #     undef @select;
! #     push @select,"";
! #     while (my ($value) =$req->fetchrow) {
! #             push @select, $value;
! #     }
! #     my $CGIpublisher=CGI::scrolling_list( -name     => 'Filter',
! #                             -id => 'Filter',
! #                             -values   => address@hidden,
! #                             -size     => 1,
! #                             -multiple => 0 );
  
        undef @select;
***************
*** 248,257 ****
        
        $template->param(hasdewey=>$hasdewey,
!                                       CGIFromDeweyClass => $CGIdewey,
!                                       CGIToDeweyClass => $CGIdewey,
                                        haslccn=> $haslccn,
                                        hlghtlccn => $hlghtlccn,
!                                       CGIFromLoCClass => $CGIlccn,
!                                       CGIToLoCClass => $CGIlccn,
                                        hascote=> $hascote,
                                        hlghtcote => $hlghtcote,
--- 248,257 ----
        
        $template->param(hasdewey=>$hasdewey,
! #                                     CGIFromDeweyClass => $CGIdewey,
! #                                     CGIToDeweyClass => $CGIdewey,
                                        haslccn=> $haslccn,
                                        hlghtlccn => $hlghtlccn,
! #                                     CGIFromLoCClass => $CGIlccn,
! #                                     CGIToLoCClass => $CGIlccn,
                                        hascote=> $hascote,
                                        hlghtcote => $hlghtcote,
***************
*** 261,270 ****
                                        hglghtHB => $hglghtHB,
                                        hglghtLOC => $hglghtLOC,
!                                       CGIFromCoteClass => $CGIcote,
!                                       CGIToCoteClass => $CGIcote,
                                        CGIItemType => $CGIitemtype,
  #                                     CGIFromPublicationYear => 
$CGIpublicationyear,
  #                                     CGIToPublicationYear => 
$CGIpublicationyear,
!                                       CGIPublisher => $CGIpublisher,
                                        CGIBranch => $CGIbranch,
                                        CGILocation => $CGIlocation,
--- 261,270 ----
                                        hglghtHB => $hglghtHB,
                                        hglghtLOC => $hglghtLOC,
! #                                     CGIFromCoteClass => $CGIcote,
! #                                     CGIToCoteClass => $CGIcote,
                                        CGIItemType => $CGIitemtype,
  #                                     CGIFromPublicationYear => 
$CGIpublicationyear,
  #                                     CGIToPublicationYear => 
$CGIpublicationyear,
! #                                     CGIPublisher => $CGIpublisher,
                                        CGIBranch => $CGIbranch,
                                        CGILocation => $CGIlocation,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]