IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2010, 3:41:53 PM (16 years ago)
Author:
rhenders
Message:

Added methid to add an interval to a time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czartool/MySQLDb.pm

    r28771 r29023  
    6464    return $self->{_dbHost};                                                 
    6565}                                                                               
     66
     67###########################################################################
     68#
     69# Adds the provided interval to the provided time
     70#
     71###########################################################################
     72sub addInterval {
     73    my ($self, $time, $interval) = @_;
     74
     75      my $query = $self->{_db}->prepare(<<SQL);
     76          SELECT '$time' + INTERVAL $interval;
     77SQL
     78    $query->execute;
     79
     80return scalar $query->fetchrow_array();
     81}
    6682
    6783###########################################################################
Note: See TracChangeset for help on using the changeset viewer.