At 16.44 26/07/99 -0500, you wrote:
>Hello Fabrizio,
>
>So you want to be able to issue SQL queries from inside your hook?

Yes ;) I also need to do some complex operations during auth phase. Another
example is my need to have users with a "daily or weekly time" to use.

>The easiest was is to get Radiator to do most of the hard work with talking to
>the database. You define a top level AuthBy SQL, and then use its built-in SQL
>handling to do the work for you:
>
>Make a top level AuthBy SQL configured to connect to yuor mysql dtabase:
>
><AuthBy SQL>
>       Identifer       fred
>       DBSource dbi:mysql:whatever
>       ....
></AuthBy>
>
>and in your hook:
>
>my $sql = Radius::AuthGeneric::find('fred'); # get a handle to the AuthBy SQL
>my $sth = $sql->prepareAndExecute('select a,b from y where z'); # some SQL
>while (($a, $b) = $sth->fetchrow())
>{
>       # $a and $b are set from the results of your SQL query
>}
>Hope that helps,.

Perfect ;)
It helps me a lot... 
sorry for my ignorance on radiator (i'm just testing it for the first
time), but where can i find a complete list of handles and functions for
hooks, or a reference manual ?
Regards and thanks in advance, Fabrizio





        --------------------------------------------------
        Fabrizio Cuseo - [EMAIL PROTECTED]
        Respons. commerciale - Panservice InterNetWorking
        Phone: +39 0773 410020 fax: +39 0773 410020
        --------------------------------------------------

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to