small script that show in HTML a MARC biblio stored in koha. Very useful for test...
[koha_fer] / misc / fixrefs.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use C4::Database;
5
6 my $dbh=C4Connect;
7 my $count=0;
8 my $query="Select * from biblioitems where itemtype='REF' or itemtype='TREF'";
9 my $sth=$dbh->prepare($query);
10 $sth->execute;
11
12 while (my $data=$sth->fetchrow_hashref){
13   $query="update items set notforloan=1 where biblioitemnumber='$data->{'biblioitemnumber'}'";
14   my $sth2=$dbh->prepare($query);
15   $sth2->execute;
16   $sth2->finish;
17 }
18 $sth->finish;
19
20
21 $dbh->disconnect;