From ac9c6ecc360df3e9347194fbb2924b2bf68954f4 Mon Sep 17 00:00:00 2001 From: osmiy Date: Fri, 30 Dec 2005 11:36:15 +0000 Subject: - added Graphs synchronization for linked hosts (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2458 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/items.inc.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'frontends/php/include/items.inc.php') diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php index 1db16857..b2e02deb 100644 --- a/frontends/php/include/items.inc.php +++ b/frontends/php/include/items.inc.php @@ -310,6 +310,18 @@ return DBexecute($sql); } + function get_items_by_hostid($hostid) + { + $sql="select * from items where hostid=$hostid"; + $result=DBselect($sql); + if(DBnum_rows($result) != 0) + { + return $result; + } + error("No items for hostid=[$hostid]"); + return FALSE; + } + function get_item_by_itemid($itemid) { $sql="select * from items where itemid=$itemid"; @@ -318,11 +330,8 @@ { return DBfetch($result); } - else - { - error("No item with itemid=[$itemid]"); - } - return $item; + error("No item with itemid=[$itemid]"); + return FALSE; } # Delete Item definition -- cgit