diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-30 11:36:15 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-30 11:36:15 +0000 |
| commit | ac9c6ecc360df3e9347194fbb2924b2bf68954f4 (patch) | |
| tree | a0f29bb7e8d470b6576adc7248e97cc91ea9da6b /frontends/php/include/items.inc.php | |
| parent | d5dce47a8b216a4db6ba2d075edd0e2de7556b6a (diff) | |
| download | zabbix-ac9c6ecc360df3e9347194fbb2924b2bf68954f4.tar.gz zabbix-ac9c6ecc360df3e9347194fbb2924b2bf68954f4.tar.xz zabbix-ac9c6ecc360df3e9347194fbb2924b2bf68954f4.zip | |
- added Graphs synchronization for linked hosts (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2458 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/items.inc.php')
| -rw-r--r-- | frontends/php/include/items.inc.php | 19 |
1 files changed, 14 insertions, 5 deletions
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 |
