Ignore:
Timestamp:
08/06/08 16:52:46 (16 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/db
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/db/builddatasets.php

    r8868 r9106  
    6868        $query0 .= " FROM " . $fromtable;
    6969
    70         $query0 .= " LEFT JOIN SequenceProcessStatus ON Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst ";
    71         $query0 .= " LEFT JOIN Calibration ON Sequences.fSequenceFirst=Calibration.fSequenceFirst ";
    72         $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst ";
     70        $query0 .= " LEFT JOIN SequenceProcessStatus USING(fSequenceFirst,fTelescopeNumber) ";
     71        $query0 .= " LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) ";
     72        $query0 .= " LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) ";
    7373
    7474        foreach ($_GET as $key => $element)
     
    7979        {
    8080            if ($_GET["fSourceName"]!="On")
    81                 $query0 .= " LEFT JOIN Source ON Sequences.fSourceKEY=Source.fSourceKEY ";
     81                $query0 .= " LEFT JOIN Source USING(fSourceKEY) ";
    8282            $query0 .= " WHERE fTest='no'";
    8383        }
     
    479479                        $query.=", " . $name;
    480480                    $query.=" FROM Sequences ";
    481                     $query.=" LEFT JOIN Calibration ON Calibration.fSequenceFirst=Sequences.fSequenceFirst ";
    482                     $query.=" LEFT JOIN Star ON Star.fSequenceFirst=Sequences.fSequenceFirst ";
     481                    $query.=" LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) ";
     482                    $query.=" LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) ";
    483483                    $query.=" WHERE Sequences.fSequenceFirst IN (" . $sequences . ")";
    484484                    $result = mysql_query($query, $db_id);
     
    501501                function GetSources($db_id, $sequences)
    502502                {
    503                     $query="SELECT fSourceName FROM Source LEFT JOIN Sequences ON Sequences.fSourceKEY=Source.fSourceKEY ";
     503                    $query="SELECT fSourceName FROM Source LEFT JOIN Sequences USING(fSourceKEY) ";
    504504                    $query.="WHERE fSequenceFirst IN (" . $sequences . ") GROUP BY fSourceName";
    505505                    $result = mysql_query($query, $db_id);
  • trunk/MagicSoft/Mars/datacenter/db/datacheck.php

    r9052 r9106  
    7676        $query0 .= " FROM RunData ";
    7777
    78         $query0 .= " LEFT JOIN RunProcessStatus ON RunData.fRunNumber=RunProcessStatus.fRunNumber ";
    79         $query0 .= " LEFT JOIN DataCheck ON DataCheck.fRunNumber=RunData.fRunNumber ";
    80         $query0 .= " LEFT JOIN RunType ON RunType.fRunTypeKEY=RunData.fRunTypeKEY ";
     78        $query0 .= " LEFT JOIN RunProcessStatus USING(fRunNumber,fTelescopeNumber,fFileNumber) ";
     79        $query0 .= " LEFT JOIN DataCheck USING(fRunNumber) ";
     80        $query0 .= " LEFT JOIN RunType USING(fRunTypeKEY) ";
    8181
    8282        foreach ($checkwhere as $key => $element)
  • trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php

    r8467 r9106  
    5757        $query0 .= " FROM " . $fromtable;
    5858
    59         $query0 .= " LEFT JOIN DataSetProcessStatus ON " . $fromtable . ".fDataSetNumber=DataSetProcessStatus.fDataSetNumber ";
    60         $query0 .= " LEFT JOIN Ganymed ON " . $fromtable . ".fDataSetNumber=Ganymed.fDataSetNumber ";
     59        $query0 .= " LEFT JOIN DataSetProcessStatus USING(fDataSetNumber) ";
     60        $query0 .= " LEFT JOIN Ganymed USING(fDataSetNumber) ";
    6161
    6262        foreach ($_GET as $key => $element)
  • trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php

    r9052 r9106  
    5757        $query0 .= " FROM " . $fromtable;
    5858
    59         $query0 .= " LEFT JOIN DataSetProcessStatus ON " . $fromtable . ".fDataSetNumber=DataSetProcessStatus.fDataSetNumber ";
    60         $query0 .= " LEFT JOIN Ganymed ON " . $fromtable . ".fDataSetNumber=Ganymed.fDataSetNumber ";
     59        $query0 .= " LEFT JOIN DataSetProcessStatus USING(fDataSetNumber) ";
     60        $query0 .= " LEFT JOIN Ganymed USING(fDataSetNumber) ";
    6161
    6262        foreach ($_GET as $key => $element)
  • trunk/MagicSoft/Mars/datacenter/db/dbstatus.php

    r8180 r9106  
    55        $joins = array
    66            (
    7              "fSourceName"                       => " LEFT JOIN Source                       ON Sequences.fSourceKEY=Source.fSourceKEY ",
     7             "fSourceName"                       => " LEFT JOIN Source USING(fSourceKEY) ",
    88            );
    99
     
    9595        $query0 .= " FROM Sequences ";
    9696
    97         $query0 .= " LEFT JOIN SequenceProcessStatus ON Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst ";
    98 
    99         $query0 .= " LEFT JOIN Calibration ON Sequences.fSequenceFirst=Calibration.fSequenceFirst ";
    100 
    101         $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst ";
     97        $query0 .= " LEFT JOIN SequenceProcessStatus USING(fSequenceFirst,fTelescopeNumber) ";
     98        $query0 .= " LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) ";
     99        $query0 .= " LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) ";
    102100
    103101        foreach ($_GET as $key => $element)
  • trunk/MagicSoft/Mars/datacenter/db/findoffdata.php

    r8768 r9106  
    7171        $query0 .= " FROM " . $fromtable;
    7272
    73         $query0 .= " LEFT JOIN SequenceProcessStatus ON Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst ";
    74         $query0 .= " LEFT JOIN Calibration ON Sequences.fSequenceFirst=Calibration.fSequenceFirst ";
    75         $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst ";
     73        $query0 .= " LEFT JOIN SequenceProcessStatus USING(fSequenceFirst,fTelescopeNumber) ";
     74        $query0 .= " LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) ";
     75        $query0 .= " LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) ";
    7676
    7777        foreach ($_GET as $key => $element)
  • trunk/MagicSoft/Mars/datacenter/db/ganymed.php

    r8789 r9106  
    1616        $query0 .= " FROM DataSets ";
    1717
    18         $query0 .= " LEFT JOIN Source ON DataSets.fSourceKEY=Source.fSourceKEY ";
    19         $query0 .= " LEFT JOIN ObservationMode ON DataSets.fObservationModeKEY=ObservationMode.fObservationModeKEY ";
    20         $query0 .= " LEFT JOIN DataSetProcessStatus ON DataSets.fDataSetNumber=DataSetProcessStatus.fDataSetNumber ";
    21         $query0 .= " LEFT JOIN Ganymed ON DataSets.fDataSetNumber=Ganymed.fDataSetNumber ";
     18        $query0 .= " LEFT JOIN Source USING(fSourceKEY) ";
     19        $query0 .= " LEFT JOIN ObservationMode USING(fObservationModeKEY) ";
     20        $query0 .= " LEFT JOIN DataSetProcessStatus USING(fDataSetNumber) ";
     21        $query0 .= " LEFT JOIN Ganymed USING(fDataSetNumber) ";
    2222
    2323        if (!empty($_GET["fRunMin"]) && !empty($_GET["fRunMax"]))
  • trunk/MagicSoft/Mars/datacenter/db/magicdefs.php

    r9052 r9106  
    156156     "fFormatVersion"                   => "F-Ver",
    157157     "fLastUpdate"                      => "LastUpd",
    158      "fRunNumber"                       => "Run#",
     158//     "fRunNumber"                       => "Run#",
     159     "Run#"                       => "Run#",
     160     "Tel:Run:File"                       => "Tel:Run:File",
    159161     "fRunTypeName"                     => "RunType",
    160162     "fMeanTriggerRate"                 => "Rate<br>[Hz]",
     
    668670    if (!empty($tables[$val]))
    669671        $table=$tables[$val];
     672    if ($val=="Tel:Run:File")
     673        $table="'Tel:Run:File'";
     674    if ($val=="Tel:Sequ")
     675        $table="'Tel:Sequ'";
    670676    if ($val=="NumRuns")
    671677        $table="'# Runs'";
     
    686692    $joins = array
    687693        (
    688          "fRunTypeName"                      => " LEFT JOIN RunType                      ON " . $fromtable . ".fRunTypeKEY=RunType.fRunTypeKEY ",
    689          "fProjectName"                      => " LEFT JOIN Project                      ON " . $fromtable . ".fProjectKEY=Project.fProjectKEY ",
    690          "fSourceName"                       => " LEFT JOIN Source                       ON " . $fromtable . ".fSourceKEY=Source.fSourceKEY ",
    691          "fMagicNumberName"                  => " LEFT JOIN MagicNumber                  ON " . $fromtable . ".fMagicNumberKEY=MagicNumber.fMagicNumberKEY ",
    692          "fL1TriggerTableName"               => " LEFT JOIN L1TriggerTable               ON " . $fromtable . ".fL1TriggerTableKEY=L1TriggerTable.fL1TriggerTableKEY",
    693          "fL2TriggerTableName"               => " LEFT JOIN L2TriggerTable               ON " . $fromtable . ".fL2TriggerTableKEY=L2TriggerTable.fL2TriggerTableKEY",
    694          "fHvSettingsName"                   => " LEFT JOIN HvSettings                   ON " . $fromtable . ".fHvSettingsKEY=HvSettings.fHvSettingsKEY",
    695          "fCalibrationScriptName"            => " LEFT JOIN CalibrationScript            ON " . $fromtable . ".fCalibrationScriptKEY=CalibrationScript.fCalibrationScriptKEY",
    696          "fExcludedFDAName"                  => " LEFT JOIN ExcludedFDA                  ON " . $fromtable . ".fExcludedFDAKEY=ExcludedFDA.fExcludedFDAKEY",
    697          "fManuallyChangedName"              => " LEFT JOIN ManuallyChanged              ON " . $fromtable . ".fManuallyChangedKEY=ManuallyChanged.fManuallyChangedKEY ",
    698          "fObservationModeName"              => " LEFT JOIN ObservationMode              ON " . $fromtable . ".fObservationModeKEY=ObservationMode.fObservationModeKEY ",
    699          "fDiscriminatorThresholdTableName"  => " LEFT JOIN DiscriminatorThresholdTable  ON " . $fromtable . ".fDiscriminatorThresholdTableKEY=DiscriminatorThresholdTable.fDiscriminatorThresholdTableKEY ",
    700          "fTriggerDelayTableName"            => " LEFT JOIN TriggerDelayTable            ON " . $fromtable . ".fTriggerDelayTableKEY=TriggerDelayTable.fTriggerDelayTableKEY ",
    701          "fTestFlagName"                     => " LEFT JOIN TestFlag                     ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY",
    702          "fLightConditionsName"              => " LEFT JOIN LightConditions              ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY",
    703          "fParticleTypeName"                 => " LEFT JOIN ParticleType                 ON " . $fromtable . ".fParticleTypeKEY=ParticleType.fParticleTypeKEY ",
    704          "fFitsFileName"                     => " LEFT JOIN FitsFile                     ON " . $fromtable . ".fFitsFileKEY=FitsFile.fFitsFileKEY",
    705          "fObjectName"                       => " LEFT JOIN Object                       ON " . $fromtable . ".fObjectKEY=Object.fObjectKEY ",
    706          "fStatusName"                       => " LEFT JOIN Status                       ON " . $fromtable . ".fStatusKEY=Status.fStatusKEY ",
    707          "fBandName"                         => " LEFT JOIN Band                         ON " . $fromtable . ".fBandKEY=Band.fBandKEY ",
    708          "fUserName"                         => " LEFT JOIN User                         ON " . $fromtable . ".fUserKEY=User.fUserKEY ",
    709          "fTelescopeName"                    => " LEFT JOIN Telescope                    ON " . $fromtable . ".fTelescopeKEY=Telescope.fTelescopeKEY ",
     694         "fRunTypeName"                     => " LEFT JOIN RunType                     USING(fRunTypeKEY) ",
     695         "fProjectName"                     => " LEFT JOIN Project                     USING(fProjectKEY) ",
     696         "fSourceName"                      => " LEFT JOIN Source                      USING(fSourceKEY) ",
     697         "fMagicNumberName"                 => " LEFT JOIN MagicNumber                 USING(fMagicNumberKEY) ",
     698         "fL1TriggerTableName"              => " LEFT JOIN L1TriggerTable              USING(fL1TriggerTableKEY) ",
     699         "fL2TriggerTableName"              => " LEFT JOIN L2TriggerTable              USING(fL2TriggerTableKEY) ",
     700         "fHvSettingsName"                  => " LEFT JOIN HvSettings                  USING(fHvSettingsKEY) ",
     701         "fCalibrationScriptName"           => " LEFT JOIN CalibrationScript           USING(fCalibrationScriptKEY) ",
     702         "fExcludedFDAName"                 => " LEFT JOIN ExcludedFDA                 USING(fExcludedFDAKEY) ",
     703         "fManuallyChangedName"             => " LEFT JOIN ManuallyChanged             USING(fManuallyChangedKEY) ",
     704         "fObservationModeName"             => " LEFT JOIN ObservationMode             USING(fObservationModeKEY) ",
     705         "fDiscriminatorThresholdTableName" => " LEFT JOIN DiscriminatorThresholdTable USING(fDiscriminatorThresholdTableKEY) ",
     706         "fTriggerDelayTableName"           => " LEFT JOIN TriggerDelayTable           USING(fTriggerDelayTableKEY) ",
     707         "fTestFlagName"                    => " LEFT JOIN TestFlag                    USING(fTestFlagKEY) ",
     708         "fLightConditionsName"             => " LEFT JOIN LightConditions             USING(fLightConditionsKEY) ",
     709         "fParticleTypeName"                => " LEFT JOIN ParticleType                USING(fParticleTypeKEY) ",
     710         "fFitsFileName"                    => " LEFT JOIN FitsFile                    USING(fFitsFileKEY) ",
     711         "fObjectName"                      => " LEFT JOIN Object                      USING(fObjectKEY) ",
     712         "fStatusName"                      => " LEFT JOIN Status                      USING(fStatusKEY) ",
     713         "fBandName"                        => " LEFT JOIN Band                        USING(fBandKEY) ",
     714         "fUserName"                        => " LEFT JOIN User                        USING(fUserKEY) ",
     715         "fTelescopeName"                   => " LEFT JOIN Telescope                   USING(fTelescopeKEY) ",
    710716        );
    711717
  • trunk/MagicSoft/Mars/datacenter/db/menu.php

    r9089 r9106  
    565565function PrintSequMenu($host,$user,$pw,$db)
    566566{
    567     printf("Sequ#&nbsp;<input name=\"fSequenceNo\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"");
     567    printf("Sequ#&nbsp;<input name=\"fSequenceNo\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"");
    568568    if (!empty($_GET["fSequenceNo"]))
    569569        printf("%s", $_GET["fSequenceNo"]);
  • trunk/MagicSoft/Mars/datacenter/db/plotinclude.php

    r8794 r9106  
    1414             "DataSetNumber"  => "fDataSetNumber");
    1515
    16 $joins=array("fSequenceFirst" => " LEFT JOIN Star ON Star.fSequenceFirst=Sequences.fSequenceFirst "
    17              ."LEFT JOIN Calibration ON Calibration.fSequenceFirst=Sequences.fSequenceFirst",
    18              "fRunNumber" => " LEFT JOIN DataCheck ON DataCheck.fRunNumber=RunData.fRunNumber ",
    19              "fDataSetNumber" =>" LEFT JOIN Ganymed ON Ganymed.fDataSetNumber=DataSets.fDataSetNumber");
     16$joins=array("fSequenceFirst" => " LEFT JOIN Star USING(fSequenceFirst,fTelescopeNumber) "
     17             ."LEFT JOIN Calibration USING(fSequenceFirst,fTelescopeNumber) ",
     18             "fRunNumber" => " LEFT JOIN DataCheck USING(fRunNumber) ",
     19             "fDataSetNumber" =>" LEFT JOIN Ganymed USING(fDataSetNumber) ");
    2020
    2121function GetList($host, $user, $pw, $db, $column, $tables)
  • trunk/MagicSoft/Mars/datacenter/db/resetseq.php

    r9052 r9106  
    4545            $query0 .= " 'crashed or failed')))) as 'starstat', fProjectName, fRunStart ";
    4646            $query0 .= "FROM SequenceProcessStatus ";
    47             $query0 .= "LEFT JOIN Sequences       ON Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst ";
    48             $query0 .= "LEFT JOIN Project         ON Project.fProjectKEY=Sequences.fProjectKEY ";
     47            $query0 .= "LEFT JOIN Sequences USING(fSequenceFirst,fTelescopeNumber) ";
     48            $query0 .= "LEFT JOIN Project USING(fProjectKEY) ";
    4949        }
    5050        else
     
    221221    echo (file_get_contents("index-header.html"));
    222222
    223     $ips=array("91.64.78.187", "132.187.47.10", "132.187.47.67", "132.187.47.63", "129.217.160.151");
     223    $ips=array("132.187.47.10", //Thomas
     224               "129.194.169.21" //Dani ISDC
     225              );
    224226    if (!in_array($_SERVER['REMOTE_ADDR'], $ips))
    225227    {
Note: See TracChangeset for help on using the changeset viewer.