summaryrefslogtreecommitdiffstats
path: root/frontends/php/map.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-09-11 04:43:17 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-09-11 04:43:17 +0000
commit5e59c850e90340775b56e146e898d55c903e2ce2 (patch)
treee7dbe0d9688af2ffbe957e976303779dffc498d5 /frontends/php/map.php
parentb45d2f672715e02f82cd0ad282579f383955e2bf (diff)
- fix for counting of triggers in map.php. (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@977 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/map.php')
-rw-r--r--frontends/php/map.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/php/map.php b/frontends/php/map.php
index 23d1c61b..cd50c42a 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -161,11 +161,11 @@
}
else
{
- $result1=DBselect("select count(*) from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.value=1 and t.status=0 and h.status in (0,2) and i.status=0");
+ $result1=DBselect("select count(distinct t.triggerid) from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.value=1 and t.status=0 and h.status in (0,2) and i.status=0");
$count=DBget_field($result1,0,0);
if($count==1)
{
- $result1=DBselect("select t.description,t.triggerid, t.priority from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.value=1 and t.status=0 and h.status in (0,2) and i.status=0");
+ $result1=DBselect("select distinct t.description,t.triggerid, t.priority from items i,functions f,triggers t,hosts h where h.hostid=i.hostid and i.hostid=$hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and t.value=1 and t.status=0 and h.status in (0,2) and i.status=0");
$label=DBget_field($result1,0,0);
if (DBget_field($result1,0,2) > 3)
$color=$red;