diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-27 13:24:36 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-27 13:24:36 +0000 |
commit | 1ed717b48516dc673b3c9fa2e9286a2988aa79df (patch) | |
tree | 3b13d829c24b42becd87fdf23ea8a003f5876294 /frontends/php/screens.php | |
parent | 4aeed04b7bc4e072ddd1af0012d90f90e26dc6ba (diff) | |
download | zabbix-1ed717b48516dc673b3c9fa2e9286a2988aa79df.tar.gz zabbix-1ed717b48516dc673b3c9fa2e9286a2988aa79df.tar.xz zabbix-1ed717b48516dc673b3c9fa2e9286a2988aa79df.zip |
- removed unnecessary table in SQL in screens.php (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5553 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/screens.php')
-rw-r--r-- | frontends/php/screens.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/frontends/php/screens.php b/frontends/php/screens.php index ca1ecd32..d7681982 100644 --- a/frontends/php/screens.php +++ b/frontends/php/screens.php @@ -256,7 +256,7 @@ include_once "include/page_header.php"; $result=DBselect('SELECT DISTINCT g.groupid, g.name '. - ' FROM groups g, hosts_groups hg, hosts h, items i, graphs_items gi '. + ' FROM groups g, hosts_groups hg, hosts h, items i '. ' WHERE g.groupid in ('.$availiable_groups.') '. ' AND hg.groupid=g.groupid '. ' AND h.status='.HOST_STATUS_MONITORED. @@ -273,8 +273,8 @@ include_once "include/page_header.php"; $r_form->AddItem(array(S_GROUP.SPACE,$cmbGroup)); if($_REQUEST['groupid'] > 0){ - $sql = ' SELECT distinct h.hostid,h.host '. - ' FROM hosts h,items i,hosts_groups hg, graphs_items gi '. + $sql = ' SELECT DISTINCT h.hostid,h.host '. + ' FROM hosts h,items i,hosts_groups hg '. ' WHERE h.status='.HOST_STATUS_MONITORED. ' AND h.hostid=i.hostid '. ' AND hg.groupid='.$_REQUEST['groupid']. @@ -283,18 +283,17 @@ include_once "include/page_header.php"; ' ORDER BY h.host'; } else{ - $sql = 'SELECT distinct h.hostid,h.host '. - ' FROM hosts h,items i, graphs_items gi '. + $sql = 'SELECT DISTINCT h.hostid,h.host '. + ' FROM hosts h,items i '. ' WHERE h.status='.HOST_STATUS_MONITORED. ' AND i.status='.ITEM_STATUS_ACTIVE. ' AND h.hostid=i.hostid'. ' AND h.hostid IN ('.$availiable_hosts.') '. ' ORDER BY h.host'; } -//SDI($sql); + $result=DBselect($sql); - while($row=DBfetch($result)) - { + while($row=DBfetch($result)){ $cmbHosts->AddItem( $row['hostid'], get_node_name_by_elid($row['hostid']).$row['host'] |