sql.conf (update query)

Michel Bélanger michel.belanger at mediom.qc.ca
Tue Aug 9 21:34:28 CEST 2005


Hi,
I try to add an additional query in the query update in sql.conf. This 
is possible to make it ?

Here what I have test:

accounting_update_query = "UPDATE ${acct_table1} \
         SET FramedIPAddress = '%{Framed-IP-Address}', \
         AcctSessionTime = '%{Acct-Session-Time}', \
         AcctInputOctets = '%{Acct-Input-Octets}', \
         AcctOutputOctets = '%{Acct-Output-Octets}' \
         WHERE AcctSessionId = '%{Acct-Session-Id}' \
         AND UserName = '%{SQL-User-Name}' \
         AND NASIPAddress= '%{NAS-IP-Address}'; INSERT into radtempo 
(AcctInputOctets, AcctOutputOctets, AcctSessionId) values('%{Ac
ct-Input-Octets}', '%{Acct-Output-Octets}', '%{Acct-Session-Id}')"

rlm_sql_mysql: MYSQL check_error: 1064 received
rlm_sql (sql): Couldn't update SQL accounting ALIVE record - You have an 
error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near '; INSERT into 
radtempo (AcctInputOctets, AcctOutputOctets, AcctSessionId) values' at 
line 1
-- 
------------------------------------------------------------

Michel Bélanger





More information about the Freeradius-Users mailing list