diff options
Diffstat (limited to 'web/nms.gathering.org/api/public/switch-state')
-rwxr-xr-x | web/nms.gathering.org/api/public/switch-state | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |