Changeset 9105 for trunk/MagicSoft/Mars/datacenter
- Timestamp:
- 08/06/08 16:13:23 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/db
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php
r8850 r9105 48 48 else 49 49 { 50 $query0 .= " RunData.fRunNumber as 'Run#' "; 50 // $query0 .= " RunData.fRunNumber as 'Run#' "; 51 // $query0 .= " Concat(RunData.fTelescopeNumber,':', RunData.fRunNumber,':', RunData.fFileNumber) as 'Run' "; 52 $query0 .= " Concat(RunData.fTelescopeNumber,':', RunData.fRunNumber,':', RunData.fFileNumber) as 'Tel:Run:File' "; 51 53 52 54 if (empty($_GET["fSendTxt"]) && !empty($_GET["fLinks"])) … … 65 67 $query0 .= " FROM RunData "; 66 68 67 $query0 .= " LEFT JOIN RunProcessStatus ON RunData.fRunNumber=RunProcessStatus.fRunNumber";69 $query0 .= " LEFT JOIN RunProcessStatus USING(fRunNumber,fTelescopeNumber,fFileNumber) "; 68 70 69 71 foreach ($_GET as $key => $element) … … 74 76 { 75 77 if ($_GET["fSourceName"]!="On") 76 $query0 .= " LEFT JOIN Source ON Sequences.fSourceKEY=Source.fSourceKEY";78 $query0 .= " LEFT JOIN Source USING(fSourceKEY) "; 77 79 $query0 .= " WHERE fTest='no'"; 78 80 } … … 262 264 printf(" <P>\n"); 263 265 PrintSourceMenu($host,$user,$pw,$db); 264 PrintNumResPullDown();265 266 printf("<p>"); 266 267 printf("</div>"); … … 271 272 ini_set("display_errors", "Off"); 272 273 274 PrintNumResPullDown(); 273 275 PrintButtons("runinfo-aio.php"); 274 276 -
trunk/MagicSoft/Mars/datacenter/db/runinfo.php
r9052 r9105 59 59 $query0 .= " FROM RunData "; 60 60 61 $query0 .= " LEFT JOIN RunProcessStatus ON RunData.fRunNumber=RunProcessStatus.fRunNumber";61 $query0 .= " LEFT JOIN RunProcessStatus USING(fRunNumber,fTelescopeNumber,fFileNumber) "; 62 62 63 63 foreach ($_GET as $key => $element) … … 68 68 { 69 69 if ($_GET["fSourceName"]!="On") 70 $query0 .= " LEFT JOIN Source ON Sequences.fSourceKEY=Source.fSourceKEY";70 $query0 .= " LEFT JOIN Source USING(fSourceKEY) "; 71 71 $query0 .= " WHERE fTest='no'"; 72 72 } -
trunk/MagicSoft/Mars/datacenter/db/sequence.php
r8468 r9105 38 38 $query0 .= " FROM Sequences "; 39 39 40 $query0 .= " LEFT JOIN Source ON Sequences.fSourceKEY=Source.fSourceKEY";41 $query0 .= " LEFT JOIN Project ON Sequences.fProjectKEY=Project.fProjectKEY";42 $query0 .= " LEFT JOIN HvSettings ON Sequences.fHvSettingsKEY=HvSettings.fHvSettingsKEY";43 $query0 .= " LEFT JOIN DiscriminatorThresholdTable ON Sequences.fDiscriminatorThresholdTableKEY=DiscriminatorThresholdTable.fDiscriminatorThresholdTableKEY";44 $query0 .= " LEFT JOIN L1TriggerTable ON Sequences.fL1TriggerTableKEY=L1TriggerTable.fL1TriggerTableKEY";45 $query0 .= " LEFT JOIN L2TriggerTable ON Sequences.fL2TriggerTableKEY=L2TriggerTable.fL2TriggerTableKEY";46 $query0 .= " LEFT JOIN TriggerDelayTable ON Sequences.fTriggerDelayTableKEY=TriggerDelayTable.fTriggerDelayTableKEY";47 $query0 .= " LEFT JOIN TestFlag ON Sequences.fTestFlagKEY=TestFlag.fTestFlagKEY";48 $query0 .= " LEFT JOIN LightConditions ON Sequences.fLightConditionsKEY=LightConditions.fLightConditionsKEY";49 $query0 .= " LEFT JOIN ManuallyChanged ON Sequences.fManuallyChangedKEY=ManuallyChanged.fManuallyChangedKEY";50 $query0 .= " LEFT JOIN SequenceProcessStatus ON Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst";51 $query0 .= " LEFT JOIN Calibration ON Sequences.fSequenceFirst=Calibration.fSequenceFirst";52 $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst";40 $query0 .= " LEFT JOIN Source USING(fSourceKEY) "; 41 $query0 .= " LEFT JOIN Project USING(fProjectKEY) "; 42 $query0 .= " LEFT JOIN HvSettings USING(fHvSettingsKEY) "; 43 $query0 .= " LEFT JOIN DiscriminatorThresholdTable USING(fDiscriminatorThresholdTableKEY) "; 44 $query0 .= " LEFT JOIN L1TriggerTable USING(fL1TriggerTableKEY) "; 45 $query0 .= " LEFT JOIN L2TriggerTable USING(fL2TriggerTableKEY) "; 46 $query0 .= " LEFT JOIN TriggerDelayTable USING(fTriggerDelayTableKEY) "; 47 $query0 .= " LEFT JOIN TestFlag USING(fTestFlagKEY) "; 48 $query0 .= " LEFT JOIN LightConditions USING(fLightConditionsKEY) "; 49 $query0 .= " LEFT JOIN ManuallyChanged USING(fManuallyChangedKEY) "; 50 $query0 .= " LEFT JOIN SequenceProcessStatus USING(fSequenceFirst,fTelescopeNumber) "; 51 $query0 .= " LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) "; 52 $query0 .= " LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) "; 53 53 54 54 … … 171 171 { 172 172 $query1 = "SELECT fRunNumber, fCalibrationScriptName FROM RunData "; 173 $query1 .= " LEFT JOIN RunType ON RunData.fRunTypeKEY=RunType.fRunTypeKEY";174 $query1 .= " LEFT JOIN CalibrationScript ON RunData.fCalibrationScriptKEY=CalibrationScript.fCalibrationScriptKEY";173 $query1 .= " LEFT JOIN RunType USING(fRunTypeKEY) "; 174 $query1 .= " LEFT JOIN CalibrationScript USING(fCalibrationScriptKEY) "; 175 175 $query1 .= " WHERE fSequenceFirst=" . $sequ . " AND fRunTypeName='" . $type . "'"; 176 176 … … 195 195 { 196 196 $query2 = "SELECT RunData.fRunNumber FROM RunData "; 197 $query2 .= " LEFT JOIN RunProcessStatus ON RunData.fRunNumber=RunProcessStatus.fRunNumber";197 $query2 .= " LEFT JOIN RunProcessStatus USING(fRunNumber,fTelescopeNumber,fFileNumber) "; 198 198 $query2 .= " WHERE fSequenceFirst=" . $sequ . " AND IsNull(" . $column . ")"; 199 199 -
trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php
r8797 r9105 51 51 //$query0 .= " CONCAT('<A&ws;HREF=\"runinfo-aio.php?', 'fRunStart=On', '&fZenithDistance=On', '&fRunMin=', Sequences.fSequenceFirst, '&fMeanTriggerRate=On', '&fTest=On', '&fRunTypeName=On', '&fRunMax=', fSequenceLast, '&fNumEvents=On', '&fSourceName=On&', 'fExcludedFDAKEY=1', '&fSequenceFirst=On', '&fRawFileAvail=On', '&fCCFileAvail=On', '&fCaCoFileAvail=On', '&fNumResults=500\">', Sequences.fSequenceFirst, '</A>') "; 52 52 //new version using fSequenceNo 53 $query0 .= " CONCAT('<A&ws;HREF=\"runinfo-aio.php?', 'fRunStart=On', '&fZenithDistance=On', '&fSequenceNo=', Sequences.fSequenceFirst, '&fMeanTriggerRate=On', '&fTest=On', '&fRunTypeName=On', '&fNumEvents=On', '&fSourceName=On&', 'fExcludedFDAKEY=1', '&fSequenceFirst=On', '&fRawFileAvail=On', '&fCCFileAvail=On', '&fCaCoFileAvail=On', '&fNumResults=500\">', Sequences.fSequenceFirst, '</A>') "; 54 $query0 .= " as " . $alias["fSequenceFirst"]; 53 $query0 .= " CONCAT('<A&ws;HREF=\"runinfo-aio.php?', 'fRunStart=On', '&fZenithDistance=On', '&fSequenceNo=', Sequences.fSequenceFirst, '&fMeanTriggerRate=On', '&fTest=On', '&fRunTypeName=On', '&fNumEvents=On', '&fSourceName=On&', 'fExcludedFDAKEY=1', '&fSequenceFirst=On', '&fRawFileAvail=On', '&fCCFileAvail=On', '&fCaCoFileAvail=On', '&fNumResults=500\">', Sequences.fTelescopeNumber, ':', Sequences.fSequenceFirst, '</A>') "; 54 // $query0 .= " as " . $alias["fSequenceFirst"]; 55 $query0 .= " as 'Tel:Sequ'"; 55 56 if (!empty($_GET["fLinks"])) 56 57 { … … 76 77 $query0 .= " FROM " . $fromtable; 77 78 78 $query0 .= " LEFT JOIN SequenceProcessStatus ON Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst";79 $query0 .= " LEFT JOIN Calibration ON Sequences.fSequenceFirst=Calibration.fSequenceFirst";80 $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst";79 $query0 .= " LEFT JOIN SequenceProcessStatus USING(fSequenceFirst,fTelescopeNumber) "; 80 $query0 .= " LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) "; 81 $query0 .= " LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) "; 81 82 82 83 foreach ($_GET as $key => $element) … … 87 88 { 88 89 if ($_GET["fSourceName"]!="On") 89 $query0 .= " LEFT JOIN Source ON Sequences.fSourceKEY=Source.fSourceKEY";90 $query0 .= " LEFT JOIN Source ON USING(fSourceKEY) "; 90 91 $query0 .= " WHERE fTest='no'"; 91 92 } … … 319 320 printf(" <P>\n"); 320 321 321 PrintNumResPullDown();322 322 323 323 ini_set("mysql.trace_mode", "Off"); 324 324 ini_set("display_errors", "Off"); 325 325 326 PrintNumResPullDown(); 326 327 PrintButtons("sequinfo-aio.php"); 327 328 -
trunk/MagicSoft/Mars/datacenter/db/sequinfo.php
r9052 r9105 72 72 $query0 .= " FROM " . $fromtable; 73 73 74 $query0 .= " LEFT JOIN SequenceProcessStatus ON Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst";75 $query0 .= " LEFT JOIN Calibration ON Sequences.fSequenceFirst=Calibration.fSequenceFirst";76 $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst";74 $query0 .= " LEFT JOIN SequenceProcessStatus USING(fSequenceFirst,fTelescopeNumber) "; 75 $query0 .= " LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) "; 76 $query0 .= " LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) "; 77 77 78 78 // foreach ($_GET as $key => $element) … … 87 87 { 88 88 if ($_GET["fSourceName"]!="On") 89 $query0 .= " LEFT JOIN Source ON Sequences.fSourceKEY=Source.fSourceKEY";89 $query0 .= " LEFT JOIN Source ON USING(fSourceKEY) "; 90 90 $query0 .= " WHERE fTest='no'"; 91 91 }
Note:
See TracChangeset
for help on using the changeset viewer.