At 10:13 AM 12/12/2002 +0100, Genoud Richard wrote:
hi !
I'm using freeradius 0.8.1 with mysql-3.23.49-3.
It' s working ok, with authentication and accounting.
but i'd like to add a SQL request in the sql.conf file ( accounting_stop_query )
the original query is :
accounting_stop_query = "UPDATE ${acct_table2} SET AcctStopTime = '%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}', AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}' AND AcctStopTime = 0"

and i'd like to add :
UPDATE ${authreply_table} SET Value='%{Session-Timeout}' WHERE Username='%{SQL-User-Name}' AND Attribute='Session-Timeout'

in the same accounting_stop_query.. .is it possible ?

I tried to put a simple ";" between the 2 requests, but it doesn't work.
does anyone got a clue ?
Not presently. You can create another instance of an 'sql' module that
executes the second accounting query.

IE:

sql SQL1 {
....
}
sql SQL2 {
....
}

accounting {
acct_unique
detail
SQL1
SQL2
}

-Chris
--
\\\|||/// \ StarNet Inc. \ Chris Parker
\ ~ ~ / \ WX *is* Wireless! \ Director, Engineering
| @ @ | \ http://www.starnetwx.net \ (847) 963-0116
oOo---(_)---oOo--\------------------------------------------------------
\ Wholesale Internet Services - http://www.megapop.net



- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Reply via email to