summaryrefslogtreecommitdiffstats
path: root/frontends/php/events.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/events.php')
-rw-r--r--frontends/php/events.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/php/events.php b/frontends/php/events.php
index 87126546..8dd4cfae 100644
--- a/frontends/php/events.php
+++ b/frontends/php/events.php
@@ -136,11 +136,11 @@
if(isset($_REQUEST["hostid"]))
{
- $sql="select distinct a.clock,a.value,t.triggerid from alarms a,triggers t,hosts h,items i,functions f where t.triggerid=a.triggerid and f.triggerid=t.triggerid and f.itemid=i.itemid and i.hostid=h.hostid and h.hostid=".$_REQUEST["hostid"]." order by clock desc limit ".(10*($_REQUEST["start"]+100));
+ $sql="select distinct a.clock,a.value,a.triggerid from alarms a,functions f,items i where a.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=".$_REQUEST["hostid"]." order by clock desc limit ".(10*($_REQUEST["start"]+100));
}
else
{
- $sql="select distinct a.clock,a.value,t.triggerid from alarms a,triggers t,hosts h,items i,functions f where t.triggerid=a.triggerid and f.triggerid=t.triggerid and f.itemid=i.itemid and i.hostid=h.hostid order by clock desc limit ".(10*($_REQUEST["start"]+100));
+ $sql="select distinct triggerid,clock,value from alarms order by clock desc limit ".(10*($_REQUEST["start"]+100));
}
$result=DBselect($sql);