(RADIATOR) Question about AcctSQLStatement.
Hugh Irvine
hugh at open.com.au
Thu Oct 24 01:28:52 CDT 2002
Hello Sergio -
From section 6.2 in the Radiator 3.3.1 reference manual:
%% The percent character
regards
Hugh
On Thursday, October 24, 2002, at 02:44 AM, Sergio Gonzalez wrote:
> *This message was transferred with a trial version of CommuniGate(tm)
> Pro*
> Hello.
>
> I'm having problems with the next SQL statement for accounting
>
> AcctSQLStatement update TABLENAME set VALUE=0%{Acct-Session-Time}
> where ROW='%n' and
> DATE_FORMAT(FROM_UNIXTIME(0%{Timestamp},'%d-%m-%y') = 'mm-dd-yy'
>
> where mm-dd-yy is a date value in that format. Well, if I do in mysql
> (obviously replacing %0{Timestamp} for a valid value):
>
> SELECT DATE_FORMAT(FROM_UNIXTIME('01035767266','%d-%m-%y') =
> 'mm-dd-yy';
>
> it works well. The format of the
> FROM_UNIXTIME(0%{Timestamp}-0%{Acct-Session-Time}) is rewrited like
> mm-dd-yy and then I can compare them, but the problem is when I try to
> do the same SQL statement with radius; the %d, %m and the %y don't
> mean the same. Those "wildcards" are being interpreted like the actual
> day month and year of the box running radius.
>
> How do I escape or make radius send to mysql the string "%d-%m-%y"
> without interpret them?.
>
>
> Sergio Alejandro Gonzalez
> Director Operativo
> Network and Services Field Manager
> SkyNet de Colombia.
> Calle 100 No. 8A-55 Of. 711
> Bogota, Cundinamarca
> Colombia, South America.
> Tel: 57 (+1) 6 422 020
> Cel: 57 (+3)/(03315) 3551034
> Pager: 5405555, 3469999 Cod 2010
>
> ===
> 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.
>
>
NB: I am travelling this week, so there may be delays in our
correspondence.
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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