Fixing : Including packages calls
[srvgit] / stats2.pl
index ed45099..2b11ca1 100755 (executable)
--- a/stats2.pl
+++ b/stats2.pl
@@ -1,5 +1,7 @@
 #!/usr/bin/perl
 
+# $Id$
+
 #written 14/1/2000
 #script to display reports
 
@@ -60,15 +62,14 @@ $date=UnixDate($date,'%Y-%m-%d');
 $date2=UnixDate($date2,'%Y-%m-%d');
 
 my $dbh = C4::Context->dbh;
-my $query="select * 
+my $sth=$dbh->prepare("select *
 from accountlines,accountoffsets,borrowers where
 accountlines.borrowernumber=accountoffsets.borrowernumber and
 (accountlines.accountno=accountoffsets.accountno or accountlines.accountno
-=accountoffsets.offsetaccount) and accountlines.timestamp >=20000621000000 
+=accountoffsets.offsetaccount) and accountlines.timestamp >=20000621000000
 and borrowers.borrowernumber=accountlines.borrowernumber
-group by accountlines.borrowernumber,accountlines.accountno";
-my $sth=$dbh->prepare($query);
-$sth->execute;
+group by accountlines.borrowernumber,accountlines.accountno");
+$sth->execute();