Hi Thomas.
If you want to do anything more complicated that run a single unconditional SQL
statment, then AcctSQLStatement is not for you.
You will probably have to set up a PostAuthHook that does exactly what you
want.
Cheers.
On Jul 6, 2:25pm, Thomas Voss wrote:
> Subject: (RADIATOR) catch DBI/DBD result code
> Hi,
>
> is there any way to catch the DBI/DBD result code from an AcctSQLStatement?
>
> We use Mysql for accounting and i'd like to have a table with
> traffic-values that are updated with every stop-record. It's no problem for
> Radiator to feed multiple tables when it receives one stop-record; i'm just
> using one <AuthBy SQL> containing two AcctSQLStatements in my radius.cfg:
> the first for inserting a normal accounting-record into my indexed
> detail-table, the second to update monthly traffic-values in my
traffic-table.
>
> But, to get rid of duplicates, i'm searching for a way to execute the
> second AcctSQLStatement ONLY if the first statement succeeded.
>
> My detail-table has an index, so that duplicates can't be inserted.
> Whenever Radiator receives a duplicate, there's an error in the logfile
> saying that the record couldn't be inserted because of the index. Thus
> Radiator internally catches the result of the query and produces this
> errormessage.
>
> It would be very nice to have something like an IF-clause or Handler where
> i can define that an AcctSQLStatement depends on the result-code radiator
> got back from the DBI/DBD-interface.
>
> Maybe it's possible to do this with a PostAuthHook when i have a variable
> containing the result-code from the database.
>
> Any ideas?
>
> Thanks,
>
> Thomas Voss
> NetCologne GmbH
>
>
>
>
> ===
> Archive at http://www.thesite.com.au/~radiator/
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
>-- End of excerpt from Thomas Voss
--
Mike McCauley [EMAIL PROTECTED]
Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au
Phone +61 3 9598-0985 Fax +61 3 9598-0955
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.