Changeset 9617 for trunk/MagicSoft/Mars/datacenter/db/mcinfo.php
- Timestamp:
- 07/28/10 14:38:30 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/mcinfo.php
r9610 r9617 85 85 $query0 .= " CONCAT('running (since ', " . $key . "Status.fStartTime, ')'), "; 86 86 $query0 .= " IF (NOT ISNULL(" . $key . "Status.fReturnCode), "; 87 $query0 .= " CONCAT('failed (', " . $key . "Status.fReturnCode, ' )'), ";87 $query0 .= " CONCAT('failed (', " . $key . "Status.fReturnCode, ', ', " . $key . "Status.fStopTime, ')'), "; 88 88 $query0 .= " CONCAT('done (', " . $key . "Status.fStopTime, "; 89 89 $query0 .= " ', ', TIMEDIFF(" . $key . "Status.fStopTime, " . $key . "Status.fStartTime), ')')))) "; … … 103 103 104 104 foreach ($_GET as $key => $element) 105 if (($_GET[$key]=="On" || $groups>0 || $statusgroups>0))// && !empty($joins[$key])) 106 $query0 .= GetJoin($fromtable,$key); 105 if ($_GET[$key]=="On" || $_GET[$key]!=0) 106 if (strpos($query0, GetJoin($fromtable,$key))==FALSE) 107 $query0 .= GetJoin($fromtable,$key); 107 108 108 109 foreach ($checkwhere as $key => $element) … … 123 124 124 125 if (strpos($query0, " WHERE ")==FALSE) 125 $query0 .= " WHERE 126 $query0 .= " WHERE"; 126 127 else 127 128 $query0 .= " AND "; … … 138 139 139 140 //remove WHERE or AND in the end of the query 140 $query0= ereg_replace(" WHERE \$", " ", $query0);141 $query0= ereg_replace(" AND \$", " ", $query0);141 $query0=preg_replace("/ WHERE\s+$/", " ", $query0); 142 $query0=preg_replace("/ AND\s+$/", " ", $query0); 142 143 143 144 if ($groups>0)
Note:
See TracChangeset
for help on using the changeset viewer.