summaryrefslogtreecommitdiffstats
path: root/frontends/php/chart3.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-12 07:14:26 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-12 07:14:26 +0000
commit60bc2b6e1946f9f7ad0d393b2b390c8acc5b6114 (patch)
tree8c81be76c0b4683acd93862d2e1d12b7ff1dfded /frontends/php/chart3.php
parentcbb3323a0ad2ae65d0134e01b807faf8df99a2d2 (diff)
downloadzabbix-60bc2b6e1946f9f7ad0d393b2b390c8acc5b6114.tar.gz
zabbix-60bc2b6e1946f9f7ad0d393b2b390c8acc5b6114.tar.xz
zabbix-60bc2b6e1946f9f7ad0d393b2b390c8acc5b6114.zip
- in chart3.php: group by <complex expression> changed to group by 1
(Alexei) git-svn-id: svn://svn.zabbix.com/trunk@451 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart3.php')
-rw-r--r--frontends/php/chart3.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/php/chart3.php b/frontends/php/chart3.php
index bc06d6cd..1e0a7ec8 100644
--- a/frontends/php/chart3.php
+++ b/frontends/php/chart3.php
@@ -78,7 +78,7 @@
if($DB_TYPE=="MYSQL")
{
- $sql="select round(900*((clock+3*3600)%(24*3600))/(24*3600)) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max from history where itemid=$itemid and clock>$from_time and clock<$to_time group by round(900*((clock+3*3600)%(24*3600))/(24*3600))";
+ $sql="select round(900*((clock+3*3600)%(24*3600))/(24*3600)) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max from history where itemid=$itemid and clock>$from_time and clock<$to_time group by 1";
// echo $sql."<br>";
$result=DBselect($sql);
while($row=DBfetch($result))
@@ -93,7 +93,7 @@ if($DB_TYPE=="MYSQL")
$count_now=array();
$avg_now=array();
- $result=DBselect("select round(900*((clock+3*3600)%(24*3600))/(24*3600)) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max from history where itemid=$itemid and clock>$from_time_now and clock<$to_time group by round(900*((clock+3*3600)%(24*3600))/(24*3600))");
+ $result=DBselect("select round(900*((clock+3*3600)%(24*3600))/(24*3600)) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max from history where itemid=$itemid and clock>$from_time_now and clock<$to_time group by 1");
while($row=DBfetch($result))
{
$i=$row["i"];