When updating max_holds should be before the categorycode in the update
query.
Things that can be found by testing :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
$sth_search->execute($categorycode);
my $res = $sth_search->fetchrow_hashref();
if ($res->{total}) {
- $sth_update->execute( $maxissueqty, $maxonsiteissueqty, $categorycode, $max_holds );
+ $sth_update->execute( $maxissueqty, $maxonsiteissueqty, $max_holds, $categorycode );
} else {
$sth_insert->execute( $categorycode, $maxissueqty, $maxonsiteissueqty, $max_holds );
}