I'm not too sure if this is related, but I know in PHP, you can only do 1
query at a time because of security reasons.. It prevents the whole problem
of unsafe variables being passed to the query possibly causing multiple
queries to be executed that the malicious user created themselves. Maybe a
similar issue is why your not able to do multiple queries on one line in FR?
Could be way off track, it's just a guess..
Frank
----- Original Message -----
From: "Franklin Trumpy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 19, 2002 1:57 PM
Subject: Re: multiple sql queries again
> > >It is possible to set multiple sql's in /etc/raddb/sql.conf
> > >accounting_stop_query and other directives? Something like 'update
> > >...; update ...;'
> >
> > Should be. Have you tried it?
> >
> > -Chris
>
> For those interested, I gave this a shot today. The accounting_start_query
> I have looks like:
>
> accounting_start_query = "INSERT into rad_acct (RadAcctId, AcctSessionId,
> AcctUniqueId, UserName, Realm, NASIPAddress, NASPort, NASPortType,
> AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
> ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
> CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
FramedProtocol,
> FramedIPAddress, AcctStartDelay, AcctStopDelay)
values('','%{Acct-Session-Id}',
> '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}',
'%{NAS-IP-Address}',
> '%{NAS-Port}', '%{NAS-Port-Type}', '%S', '0', '0', '%{Acct-Authentic}',
> '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}',
'%{Calling-Station-Id}',
> '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',
> '%{Acct-Delay-Time}', '0'); INSERT into rad_acct (RadAcctId,
> AcctSessionId) values ('', '1111111');"
>
> And the error from rlm_sql is:
>
> Couldn't update SQL accounting for START packet - You have an error in
your
> SQL syntax near '; INSERT into rad_acct (RadAcctId, AcctSessionId)
> values('', '11111')' at line 1
>
> Double quoting each query doesn't work, as the SQL module seems to grab
> only the first double quoted query in sql.conf for each directive. Single
> quoting, of course, produced syntax errors, as was to be expected. Of
> course, I might just be syntactically incorrect to begin with, which
> wouldn't be a first.
>
> Franklin
>
>
> On Wed, 19 Jun 2002, Chris Parker wrote:
>
> > Date: Wed, 19 Jun 2002 08:54:15 -0500
> > From: Chris Parker <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: Re: multiple sql queries again
> >
> > At 10:34 AM 6/19/2002 +0400, Ilja A Marchew wrote:
> > >Hello freeradius-users.
> > >
> > >It is possible to set multiple sql's in /etc/raddb/sql.conf
> > >accounting_stop_query and other directives? Something like 'update
> > >...; update ...;'
> >
> > Should be. Have you tried it?
> >
> > -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
> >
> --
> Franklin Trumpy, NFA, MNGS, GSc | Say not, "I have found the truth,"
> UNIX Systems Administrator | but rather, "I have found a truth."
> Lighthouse Communications |
> [EMAIL PROTECTED] | Say not, "I have found the path of the
soul."
> (515)244-1115 | Say rather, "I have met the soul walking
> (888)953-3278 | upon my path."
> http://www.lh.net |
> | -Kahlil Gibran, _The Prophet_,
> 1923
>
>
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html