Browse Source

deleting fulling deleting

master
chris 22 years ago
parent
commit
f4cc64fc73
  1. 16
      C4/Acquisitions.pm
  2. 1
      delitem.pl

16
C4/Acquisitions.pm

@ -685,9 +685,23 @@ sub needsmod{
sub delitem{
my ($itemnum)=@_;
my $dbh=C4Connect;
my $query="update items set wthdrawn=1 where itemnumber=$itemnum";
my $query="select * from items where itemnumber=$itemnum";
my $sth=$dbh->prepare($query);
$sth->execute;
my @data=$sth->fetchrow_array;
$sth->finish;
$query="Insert into deleteditems values (";
foreach my $temp (@data){
$query=$query."'$temp',";
}
$query=~ s/\,$/\)/;
# print $query;
$sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
$query = "Delete from items where itemnumber=$itemnum";
$sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
$dbh->disconnect;
}

1
delitem.pl

@ -12,6 +12,7 @@ use C4::Output;
use C4::Acquisitions;
my $input = new CGI;
#print $input->header;
my $item=$input->param('itemnum');
delitem($item);
my $bibitemnum=$input->param('bibitemnum');

Loading…
Cancel
Save