Changeset 7527 for trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
- Timestamp:
- 02/24/06 19:12:49 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
r7484 r7527 1 1 <?php 2 2 { 3 function CreateQuery($_GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup )3 function CreateQuery($_GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup, $needs) 4 4 { 5 5 $fromtable="DataSets"; … … 30 30 foreach ($checkstatusgroup as $key => $element) 31 31 if ($element==-1) 32 $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 32 $query0 .= " (if(IsNull(" . $key . "), if(isnull(fStartTime), 'not done', if(isnull(fFailedTime),if(isnull(" . $needs[$key] . "),'not done',if(date_sub(Now(),interval 12 hour) < fStartTime,'running','crashed')),if(isnull(" . $needs[$key] . "),'not done','failed'))) ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 33 // $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 33 34 34 35 $query0 .= " count(*) as 'DataSet#'"; … … 83 84 $query0 .= " AND "; 84 85 85 $query0 .= StatusQuery("fDataSetInserted" );86 $query0 .= StatusQuery("fStarFilesAvail" );87 $query0 .= StatusQuery("fGanymed" );88 $query0 .= StatusQuery("fFillGanymed" );86 $query0 .= StatusQuery("fDataSetInserted", $needs); 87 $query0 .= StatusQuery("fStarFilesAvail", $needs); 88 $query0 .= StatusQuery("fGanymed", $needs); 89 $query0 .= StatusQuery("fFillGanymed", $needs); 89 90 90 91 if (!empty($_GET["fRunMin"]) && !empty($_GET["fRunMax"])) … … 332 333 } 333 334 334 function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup )335 function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs) 335 336 { 336 337 $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!"); … … 342 343 mysql_select_db($db); 343 344 344 $query0 = CreateQuery($_GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup );345 $query0 = CreateQuery($_GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 345 346 346 347 $result0 = mysql_query($query0, $db_id); … … 390 391 { 391 392 if (empty($_GET["fPrintTable"])) 392 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup );393 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 393 394 else 394 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup );395 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 395 396 } 396 397
Note:
See TracChangeset
for help on using the changeset viewer.