(authtypecode, marcxml)
VALUES (?, "")';
$insert_sth = $dbh->prepare($query);
- $insert_sth->execute('authtypecode1');
+ $insert_sth->execute('atc1');
my $authid1 = $dbh->last_insert_id( undef, undef, 'auth_header', undef );
- $insert_sth->execute('authtypecode2');
+ $insert_sth->execute('atc2');
my $authid2 = $dbh->last_insert_id( undef, undef, 'auth_header', undef );
# ---------- Add 1 old_issues
$query = '
INSERT INTO old_issues
- (borrowernumber, branchcode, itemnumber)
- VALUES (?,?,?)';
+ (issue_id, borrowernumber, branchcode, itemnumber)
+ VALUES ((select coalesce(max(issue_id), 0)+1 from issues),?,?,?)';
$insert_sth = $dbh->prepare($query);
$insert_sth->execute( $borrowernumber1, $branchcode, $item_number1 );
my $issue_id1 = $dbh->last_insert_id( undef, undef, 'old_issues', undef );