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

(-)a/misc/batchRebuildBiblioTables.pl (-1 / +8 lines)
Lines 58-66 my $sth = $dbh->prepare("SELECT biblionumber FROM biblio"); Link Here
58
$sth->execute;
58
$sth->execute;
59
# my ($biblionumbermax) =  $sth->fetchrow;
59
# my ($biblionumbermax) =  $sth->fetchrow;
60
# warn "$biblionumbermax <<==";
60
# warn "$biblionumbermax <<==";
61
my @errors;
61
while (my ($biblionumber)= $sth->fetchrow) {
62
while (my ($biblionumber)= $sth->fetchrow) {
62
    #now, parse the record, extract the item fields, and store them in somewhere else.
63
    #now, parse the record, extract the item fields, and store them in somewhere else.
63
    my $record = GetMarcBiblio($biblionumber);
64
    my $record = GetMarcBiblio($biblionumber);
65
    if (not defined $record) {
66
	push @errors, $biblionumber;
67
	next;
68
    }
64
    my @fields = $record->field($tagfield);
69
    my @fields = $record->field($tagfield);
65
    my @items;
70
    my @items;
66
    my $nbitems=0;
71
    my $nbitems=0;
Lines 82-87 while (my ($biblionumber)= $sth->fetchrow) { Link Here
82
# $dbh->do("unlock tables");
87
# $dbh->do("unlock tables");
83
my $timeneeded = time() - $starttime;
88
my $timeneeded = time() - $starttime;
84
print "$i MARC record done in $timeneeded seconds\n";
89
print "$i MARC record done in $timeneeded seconds\n";
90
if (scalar(@errors) > 0) {
91
    print "Some biblionumber could not be processed though: ", join(" ", @errors);
92
}
85
93
86
# modified NEWmodbiblio to jump the MARC part of the biblio modif
94
# modified NEWmodbiblio to jump the MARC part of the biblio modif
87
# highly faster
95
# highly faster
88
- 

Return to bug 6001