diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-08-30 12:00:02 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-08-30 12:00:02 +0000 |
| commit | 021efd5bfe977924076cccd522b09d62f9218bad (patch) | |
| tree | 4a9b9cbef104a9919c5b2f7ec0b7f51bab9e4212 /include | |
| parent | ee10f3832e9cb01b848842510cff0b9097227982 (diff) | |
| download | zabbix-021efd5bfe977924076cccd522b09d62f9218bad.tar.gz zabbix-021efd5bfe977924076cccd522b09d62f9218bad.tar.xz zabbix-021efd5bfe977924076cccd522b09d62f9218bad.zip | |
All calculations are made in C code instead of SQL statements.
git-svn-id: svn://svn.zabbix.com/trunk@177 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
| -rw-r--r-- | include/functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions.c b/include/functions.c index 82c30893..2aeb7c25 100644 --- a/include/functions.c +++ b/include/functions.c @@ -62,7 +62,7 @@ int evaluate_MIN(float *min,int itemid,int parameter) now=time(NULL); - sprintf(c,"select min(value) from history where clock>%d-%d and itemid=%d",now,parameter,itemid); + sprintf(c,"select min(value) from history where clock>%d and itemid=%d",now-parameter,itemid); syslog(LOG_WARNING, "SQL:%s", c ); result = DBselect(c); @@ -98,7 +98,7 @@ int evaluate_MAX(float *max,int itemid,int parameter) now=time(NULL); - sprintf(c,"select max(value) from history where clock>%d-%d and itemid=%d",now,parameter,itemid); + sprintf(c,"select max(value) from history where clock>%d and itemid=%d",now-parameter,itemid); result = DBselect(c); if((result==NULL)||(DBnum_rows(result)==0)) |
