summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxdbhigh/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/zbxdbhigh/host.c')
-rw-r--r--src/libs/zbxdbhigh/host.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libs/zbxdbhigh/host.c b/src/libs/zbxdbhigh/host.c
index 81159296..fe2f88bd 100644
--- a/src/libs/zbxdbhigh/host.c
+++ b/src/libs/zbxdbhigh/host.c
@@ -3053,8 +3053,7 @@ static int DBadd_event(
if( !now ) now = time(NULL);
- db_events = DBselect("select value,clock from events where objectid=" ZBX_FS_UI64 " and object=%i "
- " order by clock desc", triggerid, EVENT_OBJECT_TRIGGER);
+ db_events = DBselect("select lastvalue,type from triggers where triggerid=" ZBX_FS_UI64, triggerid);
if( (event_data = DBfetch(db_events)) )
{