diff options
Diffstat (limited to 'web')
-rwxr-xr-x | web/nms.gathering.org/api/private/port-state | 2 | ||||
-rwxr-xr-x | web/nms.gathering.org/api/public/switch-state | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/web/nms.gathering.org/api/private/port-state b/web/nms.gathering.org/api/private/port-state index 6410805..1f30181 100755 --- a/web/nms.gathering.org/api/private/port-state +++ b/web/nms.gathering.org/api/private/port-state @@ -6,7 +6,7 @@ use nms::web; use strict; use warnings; -my $query = 'select sysname,extract(epoch from date_trunc(\'second\',time)) as time, '.$nms::web::ifname.',ifhighspeed,ifhcinoctets,ifhcoutoctets from polls natural join switches where time in (select max(time) from polls where ' . $nms::web::when . ' group by switch,ifname);'; +my $query = 'select sysname,extract(epoch from date_trunc(\'second\',time)) as time, ifname,ifhighspeed,ifhcinoctets,ifhcoutoctets from polls natural join switches where time in (select max(time) from polls where ' . $nms::web::when . ' group by switch,ifname);'; my $q = $nms::web::dbh->prepare($query); $q->execute(); diff --git a/web/nms.gathering.org/api/public/switch-state b/web/nms.gathering.org/api/public/switch-state index 81e8d91..e494e6d 100755 --- a/web/nms.gathering.org/api/public/switch-state +++ b/web/nms.gathering.org/api/public/switch-state @@ -6,7 +6,7 @@ use nms::web; use strict; use warnings; -my $query = 'select sysname,extract(epoch from date_trunc(\'second\',time)) as time, '.$nms::web::ifname.',ifhighspeed,ifhcinoctets,ifhcoutoctets from polls natural join switches where time in (select max(time) from polls where ' . $nms::web::when . ' group by switch,ifname);'; +my $query = 'select sysname,extract(epoch from date_trunc(\'second\',time)) as time, ifname,ifhighspeed,ifhcinoctets,ifhcoutoctets from polls natural join switches where time in (select max(time) from polls where ' . $nms::web::when . ' group by switch,ifname);'; my $q = $nms::web::dbh->prepare($query); $q->execute(); |