Changeset 9106 for trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
- Timestamp:
- 08/06/08 16:52:46 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
r8868 r9106 68 68 $query0 .= " FROM " . $fromtable; 69 69 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) "; 73 73 74 74 foreach ($_GET as $key => $element) … … 79 79 { 80 80 if ($_GET["fSourceName"]!="On") 81 $query0 .= " LEFT JOIN Source ON Sequences.fSourceKEY=Source.fSourceKEY";81 $query0 .= " LEFT JOIN Source USING(fSourceKEY) "; 82 82 $query0 .= " WHERE fTest='no'"; 83 83 } … … 479 479 $query.=", " . $name; 480 480 $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) "; 483 483 $query.=" WHERE Sequences.fSequenceFirst IN (" . $sequences . ")"; 484 484 $result = mysql_query($query, $db_id); … … 501 501 function GetSources($db_id, $sequences) 502 502 { 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) "; 504 504 $query.="WHERE fSequenceFirst IN (" . $sequences . ") GROUP BY fSourceName"; 505 505 $result = mysql_query($query, $db_id);
Note:
See TracChangeset
for help on using the changeset viewer.