Hello,

 

            I’m kinda stumped on a problem and I was hoping that someone here could help.

 

He is what I want to do.

I want to be able to, from the accounting table, figure out what user was on at a given time with a given ip address.

 

Here is the valid part of the conf:

 

                AccountingTable Accounting

                AcctColumnDef   Username,%U,formatted

                AcctColumnDef   TIME_STAMP,Timestamp,integer

                AcctColumnDef   AcctStatusType,Acct-Status-Type

                AcctColumnDef   SessionID,Acct-Session-Id

                AcctColumnDef   SessionTime,Acct-Session-Time,integer

                AcctColumnDef   DisconnectCause,Ascend-Disconnect-Cause,integer

                AcctColumnDef   ConnectProgress,Ascend-Connect-Progress,integer

                AcctColumnDef   NASIdentifier,NAS-Identifier

                AcctColumnDef   NASPort,NAS-Port,integer

                AcctColumnDef   ModemPort,Ascend-Modem-PortNo,integer

                AcctColumnDef   ModemSlot,Ascend-Modem-SlotNo,integer

                AcctColumnDef   IPAddress,Framed-Address

                AcctColumnDef   XmitRate,Ascend-Xmit-Rate

                AcctColumnDef   DataRate,Ascend-Data-Rate

                AcctColumnDef   Protocol,Framed-Protocol

                AcctColumnDef   CallerID,Caller-Id

                AcctColumnDef   Date,Timestamp,integer-date

 

I just can’t figure out the SQL statement that will return the username that I want

 

For example, I have a date and time 4/23/2002  12:16:56 and an IP address (192.168.10.1) what SQL statement can I run to get the username

 

I know with mysql 4.0 you can do a “Union” like

(SELECT Username FROM Accounting where Date > ‘4/23/2002  12:16:56 and IPAddress = ‘192.168.10.1’ and AcctType=’start’)

UNION

(SELECT Username FROM Accounting where Date > ‘4/23/2002  12:16:56 and IPAddress = ‘192.168.10.1’ and AcctType=’stop’);

 

Does anyone know how to do anything like this for mysql 3.23.44?

 

Thanks,

Tony B, CCNA, Network+

Systems Administration

GO Concepts, Inc. / www.go-concepts.com

Are you on the GO yet?

What about those you know, are they on the GO?

513.934.2800

1.888.ON.GO.YET

 

Reply via email to