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

(-)a/C4/Reports/Guided.pm (-2 / +4 lines)
Lines 424-435 sub nb_rows { Link Here
424
    while ( $sql =~ m/$derived_name/ ) {
424
    while ( $sql =~ m/$derived_name/ ) {
425
        $derived_name .= 'x';
425
        $derived_name .= 'x';
426
    }
426
    }
427
427
    my $sth = C4::Context->dbh->prepare(qq{
428
    my $sth = C4::Context->dbh->prepare(qq{
428
        SELECT COUNT(*) FROM
429
        SELECT COUNT(*) FROM
429
        ( $sql ) $derived_name
430
        ( $sql ) $derived_name
430
    });
431
    });
432
431
    $sth->execute();
433
    $sth->execute();
432
    my $n = $sth->fetch->[0];
434
    my $results = $sth->fetch;
435
    my $n = $results ? $results->[0] : 0;
433
436
434
    return $n;
437
    return $n;
435
}
438
}
436
- 

Return to bug 23624