koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.16,1.5.2.17 Biblio.pm,1.1.


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.16,1.5.2.17 Biblio.pm,1.1.2.5,1.1.2.6
Date: Wed, 15 Jan 2003 13:37:22 -0800

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv16125/C4

Modified Files:
      Tag: rel-1-2
        Acquisitions.pm Biblio.pm 
Log Message:
Fixes dangling biblioitems problem.  Will no longer allow you to delete a
biblio without also removing the biblioitems.


Index: Acquisitions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Attic/Acquisitions.pm,v
retrieving revision 1.5.2.16
retrieving revision 1.5.2.17
diff -C2 -r1.5.2.16 -r1.5.2.17
*** Acquisitions.pm     3 Sep 2002 22:35:50 -0000       1.5.2.16
--- Acquisitions.pm     15 Jan 2003 21:37:19 -0000      1.5.2.17
***************
*** 100,108 ****
  }
  
  sub itemcount{
    my ($biblio)address@hidden;
    my $dbh=C4Connect;
    my $query="Select count(*) from items where biblionumber=$biblio";
- #  print $query;
    my $sth=$dbh->prepare($query);
    $sth->execute;
--- 100,119 ----
  }
  
+ sub biblioitemcount { 
+   my ($biblio)address@hidden;
+   my $dbh=C4Connect;
+   my $query="Select count(*) from biblioitems where biblionumber=$biblio";
+   my $sth=$dbh->prepare($query);
+   $sth->execute;
+   my $data=$sth->fetchrow_hashref;
+   $sth->finish;
+   $dbh->disconnect;
+   return($data->{'count(*)'});
+ }
+ 
  sub itemcount{
    my ($biblio)address@hidden;
    my $dbh=C4Connect;
    my $query="Select count(*) from items where biblionumber=$biblio";
    my $sth=$dbh->prepare($query);
    $sth->execute;

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** Biblio.pm   14 Aug 2002 18:30:50 -0000      1.1.2.5
--- Biblio.pm   15 Jan 2003 21:37:19 -0000      1.1.2.6
***************
*** 620,623 ****
--- 620,626 ----
      $sth=$dbh->prepare($query);
      $sth->execute;
+     $query = "Delete from biblioitems where biblionumber=$biblio";
+     $sth=$dbh->prepare($query);
+     $sth->execute;
      $sth->finish;
    }
***************
*** 1000,1003 ****
--- 1003,1010 ----
  #---------------------------------------
  # $Log$
+ # Revision 1.1.2.6  2003/01/15 21:37:19  tonnesen
+ # Fixes dangling biblioitems problem.  Will no longer allow you to delete a
+ # biblio without also removing the biblioitems.
+ #
  # Revision 1.1.2.5  2002/08/14 18:30:50  tonnesen
  # Adding copyright statements to all .pl and .pm files in rel-1-2 branch




reply via email to

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