>#query = "SELECT SUM(OctetTotal) FROM thismonthsusage WHERE >UsernameView='%{%k}'" >} > .. >As soon as a new month rolls over there are NO accounting entries for that >user for that month, hence no record and freeradius denies user as he hasn't >got any entries, any body know how I should modify the view to display all >users even if they don't have an entry for current month, but rather display >them with value 0 as apposed to not at all? >
Your question belongs on the MySQL forum. Use if() function: SELECT IF(SUM(OctetTotal) IS NULL, 0, SUM(OctetTotal)) FROM ... Ivan Kalik Kalik Informatika ISP - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html