Lines 295-304
sub calculate {
Link Here
|
295 |
my $strcalc ; |
295 |
my $strcalc ; |
296 |
|
296 |
|
297 |
# Processing average loanperiods |
297 |
# Processing average loanperiods |
298 |
$strcalc .= "SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS `RANK`, biblio.biblionumber AS ID"; |
298 |
$strcalc .= "SELECT biblio.title, COUNT(biblio.biblionumber) AS `RANK`, biblio.biblionumber AS ID"; |
299 |
$strcalc .= ", itemcallnumber as CALLNUM"; |
|
|
300 |
$strcalc .= ", ccode as CCODE"; |
301 |
$strcalc .= ", location as LOC"; |
302 |
$strcalc .= " , $colfield " if ($colfield); |
299 |
$strcalc .= " , $colfield " if ($colfield); |
303 |
$strcalc .= " FROM `old_issues` |
300 |
$strcalc .= " FROM `old_issues` |
304 |
LEFT JOIN items USING(itemnumber) |
301 |
LEFT JOIN items USING(itemnumber) |
Lines 341-347
sub calculate {
Link Here
|
341 |
@$filters[12]=~ s/\*/%/g if (@$filters[12]); |
338 |
@$filters[12]=~ s/\*/%/g if (@$filters[12]); |
342 |
$strcalc .= " AND year(old_issues.issuedate) like '" . @$filters[12] ."'" if ( @$filters[12] ); |
339 |
$strcalc .= " AND year(old_issues.issuedate) like '" . @$filters[12] ."'" if ( @$filters[12] ); |
343 |
|
340 |
|
344 |
$strcalc .= " group by biblio.biblionumber"; |
341 |
$strcalc .= " group by biblio.biblionumber, biblio.title"; |
345 |
$strcalc .= ", $colfield" if ($column); |
342 |
$strcalc .= ", $colfield" if ($column); |
346 |
$strcalc .= " order by `RANK` DESC"; |
343 |
$strcalc .= " order by `RANK` DESC"; |
347 |
$strcalc .= ", $colfield " if ($colfield); |
344 |
$strcalc .= ", $colfield " if ($colfield); |
348 |
- |
|
|