$whereclause .= ' AND authorised_values.authorised_value='.$dbh->quote($itemtype) if $itemtype;
$query = "SELECT datecreated, biblio.biblionumber, title,
author, sum( items.issues ) AS tot, biblioitems.itemtype,
$whereclause .= ' AND authorised_values.authorised_value='.$dbh->quote($itemtype) if $itemtype;
$query = "SELECT datecreated, biblio.biblionumber, title,
author, sum( items.issues ) AS tot, biblioitems.itemtype,