Browse Source

deleting fulling deleting

master
chris 21 years ago
parent
commit
f4cc64fc73
2 changed files with 16 additions and 1 deletions
  1. +15
    -1
      C4/Acquisitions.pm
  2. +1
    -0
      delitem.pl

+ 15
- 1
C4/Acquisitions.pm View File

@@ -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
- 0
delitem.pl View File

@@ -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