447 |
$strcalc .= "(COUNT(DISTINCT borrowers.borrowernumber))" ; |
$strcalc .= "(COUNT(DISTINCT borrowers.borrowernumber))" ; |
448 |
} |
} |
449 |
if ($process ==3){ |
if ($process ==3){ |
450 |
$strcalc .= "(COUNT(DISTINCT itemnumber))" ; |
$strcalc .= "(COUNT(DISTINCT issues.itemnumber))" ; |
451 |
} |
} |
452 |
if ($process ==4){ |
if ($process ==4){ |
453 |
my $rqbookcount = $dbh->prepare("SELECT count(*) FROM items"); |
my $rqbookcount = $dbh->prepare("SELECT count(*) FROM items"); |
454 |
$rqbookcount->execute; |
$rqbookcount->execute; |
455 |
my ($bookcount) = $rqbookcount->fetchrow; |
my ($bookcount) = $rqbookcount->fetchrow; |
456 |
$strcalc .= "100*(COUNT(DISTINCT itemnumber))/ $bookcount " ; |
$strcalc .= "100*(COUNT(DISTINCT issues.itemnumber))/ $bookcount " ; |
457 |
} |
} |
458 |
$strcalc .= "FROM statistics,borrowers,issues where (statistics.borrowernumber=borrowers.borrowernumber) and issues.borrowernumber=borrowers.borrowernumber and issues.itemnumber=statistics.itemnumber "; |
$strcalc .= "FROM statistics,borrowers,issues where (statistics.borrowernumber=borrowers.borrowernumber) and issues.borrowernumber=borrowers.borrowernumber and issues.itemnumber=statistics.itemnumber "; |
459 |
|
|