Index: trunk/ippMonitor/def/failedCamProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/failedCamProcessedExp.d	(revision 37983)
+++ trunk/ippMonitor/def/failedCamProcessedExp.d	(revision 40882)
@@ -1,3 +1,3 @@
-TABLE camRun, camProcessedExp, chipRun, rawExp
+TABLE camRun JOIN camProcessedExp USING (cam_id) JOIN chipRun USING (chip_id) JOIN rawExp USING (exp_id)
 TITLE Camera Failed Exposures
 FILE  failedCamProcessedExp.php
@@ -5,8 +5,8 @@
 
 # the following WHERE clauses are added to all queries joined by AND
-WHERE camRun.chip_id = chipRun.chip_id
-WHERE chipRun.exp_id = rawExp.exp_id
-WHERE camProcessedExp.cam_id  = camRun.cam_id
 WHERE camProcessedExp.fault != 0
+
+RESTRICT_COUNT AND rawExp.dateobs >= CURDATE()
+UNRESTRICTED AND rawExp.dateobs >= CURDATE()
 
 # define the arguments supplied to the links below (if any)
