Look at the SQL output carefully. It's talking about radusergroup. Have you got such a user in there? Do you need to perform that check?
alan -- This smartphone uses free WiFi around the world with eduroam, now that's what I call smart.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html