deleting fulling deleting
This commit is contained in:
parent
320e320981
commit
f4cc64fc73
2 changed files with 16 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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…
Reference in a new issue