(RADIATOR) Two questions about AcctSQLStatement return variables

Hugh Irvine hugh at open.com.au
Fri Sep 10 20:56:42 CDT 2004


Hello Randall -

The simplest way to do what you describe is to use two AuthBy SQL 
clauses.

Otherwise you could use a stored procedure in the database.

regards

Hugh


On 11 Sep 2004, at 09:33, Randall wrote:

> I would like your view on the best way to handle this, please.
>
>  I would like to, on receipt of an Accounting Stop Record, perform 
> something similar to the following:
>   
>  select {field1}, {field2}, {field3}, {field4} from {Database1} where 
> {field1} = '%W'
>  If { field2} = “{something}” and {field3} = {something} then
>              Update {Database2} set {field1} =   {field1} - ({ field2} 
> * {something}) where {field3} = {Database1.field2}
>  Elseif  { field2} = “{something}” and {field3} = {something} then
>              ………
>  Else
>              ……….
>  End If
>   
>
>  I can work out the logic and SQL syntax, that is not the problem.  My 
> questions are:
>
>  Does AcctSQLStatement return variables that can be used if it is a 
> select statement.  (IE: %0, %1, %2) ?
>
>  Does this need to be done via a Hook?  If so which hook is performed 
> after receipt of a stop record?
>
>  Thank you!
>
>  Randall
>

NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list