diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-01 17:27:57 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-01 17:27:57 +0000 |
commit | d891cf94e0d947153725e558d5f3f7f55256a8df (patch) | |
tree | 3e72ac8b73fdba9f99a41008c9c1c4aea1128351 /frontends/php/include/classes | |
parent | 9a6c2b055631f727a6f599e709574455d7fc8b80 (diff) | |
download | zabbix-d891cf94e0d947153725e558d5f3f7f55256a8df.tar.gz zabbix-d891cf94e0d947153725e558d5f3f7f55256a8df.tar.xz zabbix-d891cf94e0d947153725e558d5f3f7f55256a8df.zip |
Minor fixes.
git-svn-id: svn://svn.zabbix.com/trunk@2382 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes')
-rw-r--r-- | frontends/php/include/classes/graph.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/php/include/classes/graph.inc.php b/frontends/php/include/classes/graph.inc.php index 8848da1b..b5c8ed32 100644 --- a/frontends/php/include/classes/graph.inc.php +++ b/frontends/php/include/classes/graph.inc.php @@ -569,7 +569,9 @@ if($this->period<=24*3600) { - $sql="select itemid,round(900*((clock+$z)%($p))/($p),0) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max,max(clock) as clock from history where itemid in ($str) and clock>=".$this->from_time." and clock<=".$this->to_time." group by itemid,round(900*((clock+$z)%($p))/($p),0)"; + if($this->items[0]["value_type"] == ITEM_VALUE_TYPE_UINT64) $table="history_uint"; + else $table="history"; + $sql="select itemid,round(900*((clock+$z)%($p))/($p),0) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max,max(clock) as clock from $table where itemid in ($str) and clock>=".$this->from_time." and clock<=".$this->to_time." group by itemid,round(900*((clock+$z)%($p))/($p),0)"; } else { |