- my @fields = qw( acctstarttime acctstoptime acctsessiontime
- acctinputoctets acctoutputoctets framedipaddress );
-
- my $sth = $dbh->prepare('SELECT '. join(', ', @fields).
- " FROM radacct
- WHERE UserName = ?
- AND $str2time AcctStopTime ) >= ?
- AND $str2time AcctStopTime ) <= ?
- ORDER BY AcctStartTime DESC
- ") or die $dbh->errstr;
- $sth->execute($username, $start, $end) or die $sth->errstr;