SqlCounter Error

Alan DeKok aland at deployingradius.com
Tue Mar 5 13:31:15 CET 2019

On Mar 5, 2019, at 6:29 AM, One Zero Art <onezeroartapps at gmail.com> wrote:
> Thank you I fixed the sql error by putting mysql in sqlcounter dialect.

  That works.

> Can you please tell me why this sql query is not working
> this one is working in debug mode I can see package id
> Tmp-Integer-0 := "%{sql:SELECT package FROM usersinfo WHERE
> username='%{User-Name}'}"
> but this one is not working, when I pass Tmp-Integer-0 as package ID its
> giving me blank/false. I searched google but no luck.
> Tmp-String-1 := "%{sql:SELECT 1dbstarttime FROM packages WHERE
> id='Temp-Integer-0'}"

  That's not how you refer to an attribute.  See "man unlang", or the dozens of examples in the server.

  If you want to expand an attribute dynamically you need to use %{Tmp-Integer-0}.

  Alan DeKok.

More information about the Freeradius-Users mailing list