Re: Problems with script...

Laslo Orto ( laslo@cpol.com )
Thu, 11 Dec 1997 14:13:01 -0500

The SQL query should be something like:
select calldate, username, framedaddress from calls
where framed address="put ip address here"
and calldate>="month/day/year" and calldate<="month/day/year"
order by calldate
go
calldate>="12/10/97" and calldate<="12/11/97" will output everybody who
logged on yesterday 12/10/97
You cant specify "where calldate="12/10/97"" because the calldate field
also includes the time, so it will only display logins that occured at
12:00am 12/10/97

At 12:26 PM 12/11/97 -0600, you wrote:
>I have been working on a script for a few weeks and am so frustrated with
>the inability to make it work I have tried everything. I am overlooking
>something, but what I want to do is query the database for an IP address
>for a specific day and have the report output the username IP, date, time
>of the record. Nothing too hard, or is it? Basic output would be
>
>12/11/97 username1 xxx.xxx.xxx.xxx
>12/11/97 username2 xxx.xxx.xxx.xxx
>12/11/97 username3 xxx.xxx.xxx.xxx
>
> What I am using this for is in case I have an abusive user I can backtrack
>the IP address being used to the account in use. Right now the best I can
>do is get all users using the IP address within the month. Whenever I try
>to restrict to a day or a couple of days, I get ZIP. Therefore near the
>end of the month it takes forever, then I filter thru 4 pages of reports
>for the 5-6 lines of text to get what I need.
>
> ----------------------------------------------------------
> Emerald Mailing List listserver@emerald.iea.com
>
>
Laslo Orto Computer Pages / Better.Net
Systems Administrator 253 Sheppard Ave. West
laslo@cpol.com / laslo@Better.net Toronto, Canada M2N 1N2
www.cpol.com / www.better.net Ph: +1 416 225 3030
Fax: +1 416 225 6737