summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/items.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-06 15:48:46 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-06 15:48:46 +0000
commit224ef1379dfb1c35ca45dcee50072406c76f714a (patch)
tree5079d7ad6d2a847e28dabf22a7f2f7e27dcb10b7 /frontends/php/include/items.inc.php
parent9950cb73ea6abb9150f265baa127efd52454f671 (diff)
downloadzabbix-224ef1379dfb1c35ca45dcee50072406c76f714a.tar.gz
zabbix-224ef1379dfb1c35ca45dcee50072406c76f714a.tar.xz
zabbix-224ef1379dfb1c35ca45dcee50072406c76f714a.zip
- added supporting of sqlite database for frontend (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3571 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/items.inc.php')
-rw-r--r--frontends/php/include/items.inc.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php
index 9308cdd0..fc9d7e24 100644
--- a/frontends/php/include/items.inc.php
+++ b/frontends/php/include/items.inc.php
@@ -196,9 +196,8 @@
}
}
- $db_items = DBexecute("select itemid,hostid from items".
- " where hostid=$hostid and key_=".zbx_dbstr($key));
- $db_item = DBfetch($db_items);
+ $db_item = DBfetch(DBselect("select itemid,hostid from items".
+ " where hostid=$hostid and key_=".zbx_dbstr($key)));
if($db_item && $templateid == 0)
{
error("An item with the same Key already exists for host ".$host["host"].".".
@@ -314,9 +313,8 @@
$delta=0;
}
- $db_items = DBexecute("select itemid from items".
- " where hostid=$hostid and itemid<>$itemid and key_=".zbx_dbstr($key));
- $db_item = DBfetch($db_items);
+ $db_item = DBfetch(DBselect("select itemid from items".
+ " where hostid=$hostid and itemid<>$itemid and key_=".zbx_dbstr($key)));
if($db_item && $templateid == 0)
{
error("An item with the same Key already exists for host ".$host["host"].".".
@@ -534,7 +532,7 @@
return $result;
}
- function get_items_by_hostid($hostid)
+ function &get_items_by_hostid($hostid)
{
return DBselect("select * from items where hostid=$hostid");
}