Changeset 32063
- Timestamp:
- Aug 9, 2011, 4:06:16 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/tools/czartool/Gpc1Db.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czartool/Gpc1Db.pm
r31873 r32063 168 168 ########################################################################### 169 169 # 170 # Returns count of exposures that have been registered 171 # 172 # NB JOINing summitExp to newExp to rawExp because summit_id is indexed, whereas 173 # a direct JOIN from summitExp to rawExp using exp_name is more direct, but slower 174 # as exp_name is not indexed in rawExp 175 # 176 ########################################################################### 177 sub countRegisteredExposures { 178 my ($self, $label, $date) = @_; 179 180 my $query = $self->{_db}->prepare(<<SQL); 181 SELECT COUNT(*) 182 FROM summitExp 183 JOIN newExp USING (summit_id) 184 JOIN rawExp USING(exp_id) 185 JOIN chipRun USING(exp_id) 186 WHERE summitExp.dateobs > '$date' 187 AND summitExp.exp_type = 'OBJECT' 188 AND chipRun.label = "$label"; 189 SQL 190 191 $query->execute; 192 return scalar $query->fetchrow_array(); 193 } 194 195 ########################################################################### 196 # 170 197 # Returns count of exposures with this state for this label 171 198 #
Note:
See TracChangeset
for help on using the changeset viewer.
