[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] CVS: koha deletemem.pl,NONE,1.1

From: Chris Cormack
Subject: [Koha-devel] CVS: koha deletemem.pl,NONE,1.1
Date: Thu, 05 Jul 2001 14:38:01 -0700

Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv25435

Added Files:
Log Message:
Script to delete a member/patron

--- NEW FILE ---

#script to delete items
#written 2/5/00
#by address@hidden

use strict;

use C4::Search;
use CGI;
use C4::Output;
use C4::Database;
use C4::Circulation::Circ2;
#use C4::Acquisitions;

my $input = new CGI;
#print $input->header;
my $member=$input->param('member');
my %env;
my %member2;
my $issues=currentissues(\%env,\%member2);
my $i=0;
foreach (sort keys %$issues) {
if ($i > 0){ 
  print $input->header;
  print "error borrower has items on issue";
} else {
  print $input->redirect("/members/");

sub delmember{
  my ($member)address@hidden;
  my $dbh=C4Connect;
  my $query="Select * from borrowers where borrowernumber='$member'";
  my $sth=$dbh->prepare($query);
  my @data=$sth->fetchrow_array;
  $query="Insert into deletedborrowers values (";
  foreach my $temp (@data){
  $query=~ s/\,$/\)/;
  #  print $query;
  $query = "Delete from borrowers where borrowernumber='$member'";

reply via email to

[Prev in Thread] Current Thread [Next in Thread]