@@ -, +, @@ --- misc/cronjobs/j2a.pl | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) --- a/misc/cronjobs/j2a.pl +++ a/misc/cronjobs/j2a.pl @@ -142,7 +142,15 @@ $sth->execute( $fromcat ) my $agelimit = $sth->fetchrow_array(); if ( not $agelimit ) { - die "No patron category with that category code. Please try again. \n"; + die "No patron category $fromcat. Please try again. \n"; +} +$query=qq|SELECT categorycode from categories where categorycode=?|; +$sth=$dbh->prepare( $query ); +$sth->execute( $tocat ) + or die "Couldn't execute statement: " . $sth->errstr; +my $tocatage = $sth->fetchrow_array(); +if ( not $tocatage ){ + die "No patron category $tocat. Please try again. \n"; } $sth->finish( ); $year -=$agelimit; --