SQL queries for radacct

Steven Staples sstaples at mnsi.net
Wed Dec 23 17:11:12 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 :)

Thanks in advance!

Steve Staples.




More information about the Freeradius-Users mailing list