* modification of tables/row names : *_tag_* replaced by *_subfield_* where needed
[koha.git] / marc / test
1 #!/usr/bin/perl
2
3
4
5 use C4::Database;
6 use C4::Catalogue;
7 use CGI;
8 use DBI;
9 #use strict;
10 use C4::Acquisitions;
11 use C4::Output;
12 my $userid=$ENV{'REMOTE_USER'};
13
14
15 my $dbh=C4Connect;
16
17 my $newschool=$ARGV[0];
18 ($newschool) || ($newschool='SHE');
19
20 #changeSubfield(45,'876','c','7.20','7.30',451);
21
22
23 my $sth=$dbh->prepare("select * from items where barcode='1024'");
24 $sth->execute;
25 my $item=$sth->fetchrow_hashref();
26 print $item->{'homebranch'}."\n";
27 print $item->{'barcode'}."\n";
28 print $item->{'biblionumber'}."\n";
29 $item->{'homebranch'}=$newschool;
30 print $item->{'homebranch'}."\n";
31 updateItem($env, $item);
32 $sth->finish;
33 $dbh->disconnect;