SQL queries for radacct

tnt at kalik.net tnt at kalik.net
Thu Dec 24 03:01:46 CET 2009


> Ok... take this query for example..
> (as found in the dialup.conf sql page)
>
> group_membership_query = "SELECT groupname \
>          FROM ${usergroup_table} \
>          WHERE username = BINARY '%{SQL-User-Name}' \
>          ORDER BY priority"
>
> Before I go ahead and try it, I am just curious, would changing the ' ' to
> "
> " make any difference?
>
> group_membership_query = 'SELECT groupname \
>          FROM ${usergroup_table} \
>          WHERE username = BINARY "%{SQL-User-Name}" \
>          ORDER BY priority'
>
> So rather than have it wrapped in " ", it is now wrapped in ' ' and the
> variables are in ' ' rather than " "?
>
> I know in PHP that the "" and '' have 2 different meanings, but I am not
> sure in here, if they have special meanings or not.
>
> This isn't the query I have in question, but it's a much smaller query,
> and
> easy to see what I am referring too :)

Read man unlang and see what do quotes do. It's not the same.

Ivan Kalik




More information about the Freeradius-Users mailing list