diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-08-24 08:22:22 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-08-24 08:22:22 +0000 |
commit | addb17a711bc8735105642b1ba851616cc55695a (patch) | |
tree | 25b87e5dc13e1a10c6b8d8328d32d31d973ac7e5 | |
parent | d377030757298a5bb8f341f5aee2eed61ab6e486 (diff) | |
download | zabbix-addb17a711bc8735105642b1ba851616cc55695a.tar.gz zabbix-addb17a711bc8735105642b1ba851616cc55695a.tar.xz zabbix-addb17a711bc8735105642b1ba851616cc55695a.zip |
- fixed SQL for PostgreSQL (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4650 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r-- | frontends/php/chart2.php | 8 | ||||
-rw-r--r-- | frontends/php/chart6.php | 13 |
2 files changed, 11 insertions, 10 deletions
diff --git a/frontends/php/chart2.php b/frontends/php/chart2.php index 1873500b..048e6c55 100644 --- a/frontends/php/chart2.php +++ b/frontends/php/chart2.php @@ -54,10 +54,10 @@ include_once 'include/page_header.php'; $denyed_hosts = get_accessible_hosts_by_user($USER_DETAILS, PERM_READ_ONLY, PERM_MODE_LT); if( !($db_data = DBfetch(DBselect('SELECT g.*,h.host,h.hostid '. - ' FROM graphs g '. - ' LEFT JOIN graphs_items gi ON g.graphid=gi.graphid '. - ' LEFT JOIN items i ON gi.itemid=i.itemid '. - ' LEFT JOIN hosts h ON i.hostid=h.hostid '. + ' FROM graphs as g '. + ' LEFT JOIN graphs_items as gi ON g.graphid=gi.graphid '. + ' LEFT JOIN items as i ON gi.itemid=i.itemid '. + ' LEFT JOIN hosts as h ON i.hostid=h.hostid '. ' WHERE g.graphid='.$_REQUEST['graphid']. ' AND ( h.hostid not in ('.$denyed_hosts.') '. ' OR h.hostid is NULL) ')))) diff --git a/frontends/php/chart6.php b/frontends/php/chart6.php index 4819991b..6ce57448 100644 --- a/frontends/php/chart6.php +++ b/frontends/php/chart6.php @@ -57,12 +57,13 @@ include_once "include/page_header.php"; if( !($db_data = DBfetch(DBselect( 'SELECT g.*,h.host,h.hostid '. - ' FROM graphs g '. - ' LEFT JOIN graphs_items gi ON g.graphid=gi.graphid '. - ' LEFT JOIN items i ON gi.itemid=i.itemid '. - ' LEFT JOIN hosts h ON i.hostid=h.hostid '. - ' WHERE g.graphid='.$_REQUEST["graphid"]. - ' OR h.hostid IS NULL) ')))) + ' FROM graphs as g '. + ' LEFT JOIN graphs_items as gi ON g.graphid=gi.graphid '. + ' LEFT JOIN items as i ON gi.itemid=i.itemid '. + ' LEFT JOIN hosts as h ON i.hostid=h.hostid '. + ' WHERE g.graphid='.$_REQUEST['graphid']. + ' AND ( h.hostid not in ('.$denyed_hosts.') '. + ' OR h.hostid is NULL) ')))) { access_deny(); } |