Index: trunk/ippMonitor/def/chipProcessedImfile_failure.d
===================================================================
--- trunk/ippMonitor/def/chipProcessedImfile_failure.d	(revision 37983)
+++ trunk/ippMonitor/def/chipProcessedImfile_failure.d	(revision 40882)
@@ -1,3 +1,3 @@
-TABLE chipRun, rawExp, chipProcessedImfile
+TABLE chipRun JOIN rawExp using (exp_id) JOIN chipProcessedImfile using (chip_id)
 TITLE Chip Failed Imfiles
 FILE  chipProcessedImfile_failure.php
@@ -5,8 +5,8 @@
 
 # limit this table to non-OBJECT types of images
-WHERE chipRun.exp_id = rawExp.exp_id
-WHERE chipProcessedImfile.exp_id = chipRun.exp_id
-WHERE chipProcessedImfile.chip_id = chipRun.chip_id
 WHERE chipProcessedImfile.fault != 0
+
+RESTRICT_COUNT AND rawExp.dateobs >= CURDATE()
+UNRESTRICTED AND rawExp.dateobs >= CURDATE()
 
 ARGS  ARG1 rawImfile.exp_id=$rawExp.exp_id
