X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_svc.pm;h=7516be5999f18dea6c6854a6769aac14be65675c;hp=e0d582b5100f74fa605ca14a21438d848e17bd06;hb=d32ae4e36b14a3418979856e3ee3f662c5290d65;hpb=548a47b0ec1040320e56f17cfac71f716785cb95 diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index e0d582b51..7516be599 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -477,14 +477,14 @@ sub attribute_since_sqlradacct { $str2time = 'extract(epoch from '; } - my $sth = $dbh->prepare("SELECT SUM(?) + my $sth = $dbh->prepare("SELECT SUM($attrib) FROM radacct WHERE UserName = ? AND $str2time AcctStopTime ) >= ? AND $str2time AcctStopTime ) < ? AND AcctStopTime IS NOT NULL" ) or die $dbh->errstr; - $sth->execute($attrib, $username, $start, $end) or die $sth->errstr; + $sth->execute($username, $start, $end) or die $sth->errstr; $sum += $sth->fetchrow_arrayref->[0];