Koha/marc/test
arensb dbca39823f Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
2002-10-05 09:44:27 +00:00

30 lines
662 B
Perl

#!/usr/bin/perl
use C4::Context;
use C4::Catalogue;
use CGI;
use DBI;
#use strict;
use C4::Acquisitions;
use C4::Biblio;
use C4::Output;
my $userid=$ENV{'REMOTE_USER'};
my $dbh = C4::Context->dbh;
my $newschool=$ARGV[0];
($newschool) || ($newschool='SHE');
#changeSubfield(45,'876','c','7.20','7.30',451);
my $sth=$dbh->prepare("select * from items where barcode='1024'");
$sth->execute;
my $item=$sth->fetchrow_hashref();
print $item->{'homebranch'}."\n";
print $item->{'barcode'}."\n";
print $item->{'biblionumber'}."\n";
$item->{'homebranch'}=$newschool;
print $item->{'homebranch'}."\n";
updateItem($env, $item); # FIXME - $env undefined
$sth->finish;