IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30521


Ignore:
Timestamp:
Feb 8, 2011, 11:13:25 AM (15 years ago)
Author:
rhenders
Message:

Added a method to count the number of warps contributing to a given stack (identified by stack_id)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/perl/ippToPsps/Gpc1Db.pm

    r29234 r30521  
    3434
    3535    return 1;
     36}
     37
     38###########################################################################
     39#
     40# Returns a count of warps thyat contributed to the stack with this stack ID
     41#
     42###########################################################################
     43sub countContributingWarpsToStack {
     44        my ($self, $stackId) = @_;
     45
     46          my $query = $self->{_db}->prepare(<<SQL);
     47          SELECT COUNT(DISTINCT warp_id)
     48              FROM stackInputSkyfile
     49              WHERE stack_id = $stackId
     50SQL
     51
     52    $query->execute;
     53    return scalar $query->fetchrow_array();
    3654}
    3755
Note: See TracChangeset for help on using the changeset viewer.