diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-16 17:45:23 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-16 17:45:23 +0000 |
commit | a2f46eff39e547e40d042ce97851805b9f9efea4 (patch) | |
tree | 674ce1bfe3af9dd6ca058b44d5d0fdf9e7b4ba29 /frontends/php/chart.html | |
parent | a23282b7b988f6bbe5e7f98170c88e0dfe24fc3b (diff) | |
download | zabbix-a2f46eff39e547e40d042ce97851805b9f9efea4.tar.gz zabbix-a2f46eff39e547e40d042ce97851805b9f9efea4.tar.xz zabbix-a2f46eff39e547e40d042ce97851805b9f9efea4.zip |
Added PostgreSQL support for PHP frontend. Added database abstraction layer in frontend/php/include/db.inc.
git-svn-id: svn://svn.zabbix.com/trunk@42 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/chart.html')
-rw-r--r-- | frontends/php/chart.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontends/php/chart.html b/frontends/php/chart.html index e4e20602..c322b4d6 100644 --- a/frontends/php/chart.html +++ b/frontends/php/chart.html @@ -46,7 +46,7 @@ $from_time = time(NULL)-$period-3600*$from; $to_time = time(NULL)-3600*$from; - $result=mysql_query("select clock,value from history where itemid=$itemid and clock>$from_time and clock<$to_time order by clock",$mysql); + $result=DBselect("select clock,value from history where itemid=$itemid and clock>$from_time and clock<$to_time order by clock"); $len=0; $maxX=-1000000000; $maxY=-1000000000; @@ -54,11 +54,11 @@ $minY=1000000000; $x=array(); $y=array(); - while($row=mysql_fetch_row($result)) + for($i=0;$i<DBnum_rows($result);$i++) { $nodata=0; - $x[$len]=$row[0]; - $y[$len]=$row[1]; + $x[$len]=DBget_field($result,$i,0); + $y[$len]=DBget_field($result,$i,1);; // echo $row[0]," - ",$y[$len],"<Br>"; if($x[$len]>$maxX) { $maxX=$x[$len]; } if($x[$len]<$minX) { $minX=$x[$len]; } |