Changeset 7527 for trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
- Timestamp:
- 02/24/06 19:12:49 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
r7523 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="Sequences"; … … 36 36 foreach ($checkstatusgroup as $key => $element) 37 37 if ($element==-1) 38 $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 38 $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] . "', "; 39 // $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 39 40 40 41 $query0 .= " count(*) as 'Sequence'"; … … 119 120 $query0 .= " AND "; 120 121 121 $query0 .= StatusQuery("fStar" );122 $query0 .= StatusQuery("fStar", $needs); 122 123 123 124 if (!empty($_GET["fRunMin"]) && !empty($_GET["fRunMax"])) … … 603 604 } 604 605 605 function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms )606 function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs) 606 607 { 607 608 $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!"); … … 613 614 mysql_select_db($db); 614 615 615 $query0 = CreateQuery($_GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup );616 $query0 = CreateQuery($_GET, $alias, $checkwhere, $checkgroup, $checkstatusgroup, $needs); 616 617 617 618 $result0 = mysql_query($query0, $db_id); … … 644 645 header("Content-Disposition: attachment; filename=query-result.txt"); 645 646 646 PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms );647 PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs); 647 648 } 648 649 else … … 661 662 { 662 663 if (empty($_GET["fPrintTable"])) 663 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms );664 else 665 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms );664 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs); 665 else 666 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs); 666 667 } 667 668
Note:
See TracChangeset
for help on using the changeset viewer.