From 185c80bb6002d687e14d8711851b114ad85b50b4 Mon Sep 17 00:00:00 2001 From: james_wells Date: Fri, 4 Nov 2005 05:21:27 +0000 Subject: Applied graph generation fix. zabbix/ChangeLog zabbix/frontends/php/include/classes.inc.php git-svn-id: svn://svn.zabbix.com/trunk@2265 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/classes.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontends/php/include/classes.inc.php') diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php index 60b47c5e..a9bad25d 100644 --- a/frontends/php/include/classes.inc.php +++ b/frontends/php/include/classes.inc.php @@ -505,11 +505,11 @@ 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)"; + $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 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)"; } else { - $sql="select itemid,round(900*((clock+$z)%($p))/($p),0) as i,sum(num) as count,avg(value_avg) as avg,min(value_min) as min,max(value_max) as max,max(clock) as clock from trends where itemid in ($str) and clock>=".$this->from_time." and clock<=".$this->to_time." group by itemid,round(900*((clock+$z)%($p))/($p),0)"; + $sql="select itemid,round(900*((clock+$z)%($p))/($p),0) as i,sum(num) as count,avg(value_avg) as avg,min(value_min) as min,max(value_max) as max from trends where itemid in ($str) and clock>=".$this->from_time." and clock<=".$this->to_time." group by itemid,round(900*((clock+$z)%($p))/($p),0)"; } // echo $sql; -- cgit