Re: how to have freeradius/unlang do two or more SQL statements at one time

2009-03-16 Thread Alan DeKok
Dave Sinclair wrote: sql.conf - sql/mysql/dialup.conf postauth_query = INSERT INTO ${authcheck_table} VALUES (NULL,'%{User-Name}','Password', '==', '%{User-Password:-Chap-Password}'); postauth_query = INSERT INTO ${usergroup_table} values ('%{User-Name}','Dynamic','');

Re: how to have freeradius/unlang do two or more SQL statements at one time

2009-03-16 Thread Pshem Kowalczyk
Hi, If your sql server allows that you can run a stored procedure here and just pass all the required parameters there. kind regards Pshem - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: how to have freeradius/unlang do two or more SQL statements at onetime

2009-03-16 Thread tnt
When Post-Auth-Type REJECT is executed I need to insert two or more rows into a SQL data base. here is what I have at present sites-enabled/default Post-Auth-Type REJECT { sql } sql.conf - sql/mysql/dialup.conf postauth_query = INSERT INTO

Re: how to have freeradius/unlang do two or more SQL statements at onetime

2009-03-16 Thread Marinko Tarlac
also try with UNION ... On Mon, Mar 16, 2009 at 10:39 AM, t...@kalik.net wrote: When Post-Auth-Type REJECT is executed I need to insert two or more rows into a SQL data base. here is what I have at present sites-enabled/default Post-Auth-Type REJECT { sql

Re: how to have freeradius/unlang do two or more SQL statements at onetime

2009-03-16 Thread Arran Cudbard-Bell
Hi All, The old rlm_xlat function only supported SELECT statements, and threw up errors on any others. The patch Alan mentioned makes rlm_sql look for INSERT, DELETE and UPDATE keywords at the beginning of SQL statements. If one of these keywords is found and instead of expanding

Re: how to have freeradius/unlang do two or more SQL statements at onetime

2009-03-16 Thread Dave Sinclair
at the beginning of SQL statements. If one of these keywords is found and instead of expanding to the first row of the first column of the result, rlm_sql expands to the number of rows affected by the statement, and no longer throws an error. It is now therefore possible, to replicate most

Re: how to have freeradius/unlang do two or more SQL statements at onetime

2009-03-16 Thread Dave Sinclair
Hi Tried this, but it tossed out errors at me :( 2009/3/16 t...@kalik.net: When Post-Auth-Type REJECT is executed I need to insert two or more rows into a SQL data base. here is what I have at present sites-enabled/default        Post-Auth-Type REJECT {                sql        }

Re: how to have freeradius/unlang do two or more SQL statements at onetime

2009-03-16 Thread Arran Cudbard-Bell
On 16/3/09 14:14, Dave Sinclair wrote: Hi Arran, Where might one find your patch ??? In the git repository once Alan reads his email and checks it in :) (hopefully soon). -- Arran Cudbard-Bell (a.cudbard-b...@sussex.ac.uk), Authentication, Authorisation and Accounting Officer,

how to have freeradius/unlang do two or more SQL statements at one time

2009-03-15 Thread Dave Sinclair
Hi, When Post-Auth-Type REJECT is executed I need to insert two or more rows into a SQL data base. here is what I have at present sites-enabled/default Post-Auth-Type REJECT { sql } sql.conf - sql/mysql/dialup.conf postauth_query = INSERT INTO

SQL Statements

2008-06-06 Thread Anders Holm
So, I'm getting closer to my end goal. I have a few questions though regarding SQL statements and what impacts there may be if I go about changing them.. My lovely DBA is telling me the expected traffic figures I have given them may put some interesting load on the DB backend. They'd love

Re: SQL Statements

2008-06-06 Thread Ivan Kalik
is not null (2.0.x) or 0 (1.1.x). Ivan Kalik Kalik Informatika ISP Dana 6/6/2008, Anders Holm [EMAIL PROTECTED] piše: So, I'm getting closer to my end goal. I have a few questions though regarding SQL statements and what impacts there may be if I go about changing them.. My lovely DBA is telling me

sql_log outputs truncated sql-statements

2006-06-13 Thread Hans-Peter Fuchs
I have updated to freeradius1.1.2 under linux rh as3 and want to use the sql_log module. Most of the lines sql_log outputs are valid sql-statements, but there are also a lot of truncated lines: INSERT INTO radacct (AcctSessionId, AcctUniqueId, UserName, Realm ,NASIPAddress , NASPortId

Re: sql_log outputs truncated sql-statements

2006-06-13 Thread Nicolas Baradakis
Hans-Peter Fuchs wrote: Configuration of sql_log: [...] Alive = UPDATE ${acct_table} \ SET FramedIPAddress = '%{Framed-IP-Address}', \ AcctSessionTime = '%{Acct-Session-Time}', \ AcctInputOctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}' \ WHERE