Sorry for troubling everyone on this, but I cannot work out why Session-Octets-Limit is not calculating the differences between the counter and the check_item and setting an higher limited than the check_item?
 
Log below
 
Sun Feb  7 12:59:50 2010 : Debug: rlm_sqlcounter: Check item is greater than query result
Sun Feb  7 12:59:50 2010 : Debug: rlm_sqlcounter: Authorized user FT-memjxa, check_item=262100000, counter=151223038
Sun Feb  7 12:59:50 2010 : Debug: rlm_sqlcounter: Sent Reply-Item for user FT-memjxa, Type=Session-Octets-Limit, value=263954010
Sun Feb  7 12:59:50 2010 : Info: ++[monthlytraffic] returns ok
 

sqlcounter monthlytraffic {
         counter-name = Monthly-Traffic
                check-name = Max-Monthly-Traffic
                reply-name = Session-Octets-Limit
                sqlmod-inst = sql
                key = User-Name
                reset = monthly
         query = "SELECT IFNULL((sum(acctinputoctets)+sum(acctoutputoctets)),0) FROM radacct WHERE username='%{%k}' AND Month(acctstoptime) =(Month(NOW())) AND Year(acctstoptime) = Year(NOW())"
}
 
Any pointers would help.
 
Thx
Nev