my $sql = 'SELECT '.$tclass->primary_key.
' FROM '.$table.
' WHERE '.$tclass->primary_key.' > '.$$lastrecnum.
" AND payby IN ( 'CARD', 'DCRD', 'CHEK', 'DCHK' ) ".
my $sql = 'SELECT '.$tclass->primary_key.
' FROM '.$table.
' WHERE '.$tclass->primary_key.' > '.$$lastrecnum.
" AND payby IN ( 'CARD', 'DCRD', 'CHEK', 'DCHK' ) ".