Lines 297-303
sub calculate {
Link Here
|
297 |
my $strcalc ; |
297 |
my $strcalc ; |
298 |
|
298 |
|
299 |
# Processing average loanperiods |
299 |
# Processing average loanperiods |
300 |
$strcalc .= "SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS RANK, biblio.biblionumber AS ID"; |
300 |
$strcalc .= "SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS `RANK`, biblio.biblionumber AS ID"; |
301 |
$strcalc .= ", itemcallnumber as CALLNUM"; |
301 |
$strcalc .= ", itemcallnumber as CALLNUM"; |
302 |
$strcalc .= ", ccode as CCODE"; |
302 |
$strcalc .= ", ccode as CCODE"; |
303 |
$strcalc .= ", location as LOC"; |
303 |
$strcalc .= ", location as LOC"; |
Lines 345-351
sub calculate {
Link Here
|
345 |
|
345 |
|
346 |
$strcalc .= " group by biblio.biblionumber"; |
346 |
$strcalc .= " group by biblio.biblionumber"; |
347 |
$strcalc .= ", $colfield" if ($column); |
347 |
$strcalc .= ", $colfield" if ($column); |
348 |
$strcalc .= " order by RANK DESC"; |
348 |
$strcalc .= " order by `RANK` DESC"; |
349 |
$strcalc .= ", $colfield " if ($colfield); |
349 |
$strcalc .= ", $colfield " if ($colfield); |
350 |
|
350 |
|
351 |
my $dbcalc = $dbh->prepare($strcalc); |
351 |
my $dbcalc = $dbh->prepare($strcalc); |
352 |
- |
|
|