View | Details | Raw Unified | Return to bug 20144
Collapse All | Expand All

(-)a/t/db_dependent/UsageStats.t (-3 / +2 lines)
Lines 294-301 sub construct_objects_needed { Link Here
294
    # ---------- Add 1 old_issues
294
    # ---------- Add 1 old_issues
295
    $query = '
295
    $query = '
296
    INSERT INTO old_issues
296
    INSERT INTO old_issues
297
      (borrowernumber, branchcode, itemnumber)
297
      (issue_id, borrowernumber, branchcode, itemnumber)
298
    VALUES (?,?,?)';
298
    VALUES ((select coalesce(max(issue_id), 0)+1 from issues),?,?,?)';
299
    $insert_sth = $dbh->prepare($query);
299
    $insert_sth = $dbh->prepare($query);
300
    $insert_sth->execute( $borrowernumber1, $branchcode, $item_number1 );
300
    $insert_sth->execute( $borrowernumber1, $branchcode, $item_number1 );
301
    my $issue_id1 = $dbh->last_insert_id( undef, undef, 'old_issues', undef );
301
    my $issue_id1 = $dbh->last_insert_id( undef, undef, 'old_issues', undef );
302
- 

Return to bug 20144