473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Outside and Within Campus?

Is there a line of coding that will record down the number of login Within and Outside the Campus? I'm not sure how to make it Withina and Outside

SQL>
SQL>
SQL> create table audit_info
2 (
3 usr varchar2(50),
4 log_time timestamp(6)
5 );

Table created.

SQL>
SQL>
SQL> create table err_log
2 (
3 log_cd varchar2(20),
4 log_desc varchar2(500)
5 );

Table created.

SQL>
SQL>
SQL> create or replace procedure ins_err(errcd in varchar2,
2 errnm in varchar2)
3 is
4 pragma autonomous_transaction;
5 begin
6 insert into err_log values(errcd,errnm);
7 commit;
8 end;
9 /

Procedure created.

SQL>
SQL>
SQL> create or replace procedure ins_aud(ud in varchar2,
2 unm in varchar2)
3 is
4 pragma autonomous_transaction;
5 begin
6 insert into audit_info values(ud,unm);
7 commit;
8 exception
9 when others then
10 ins_err(sqlcode,sqlerrm);
11 end;
12 /

Procedure created.

SQL>

SQL>
SQL>
SQL> create or replace trigger log_odsuser1
2 after logon on odsuser1.schema
3 begin
4 ins_aud('ODSUSER1',sysdate);
5 exception
6 when others then
7 ins_err(sqlcode,sqlerrm);
8 end;
9 /
Jun 18 '07 #1
7 1618
debasisdas
8,127 Expert 4TB
Can you please specify what is "Within and Outside the Campus"
Jun 18 '07 #2
Library portal home statistics shows how many users (outside and within the campus) visit the library portal.
Page Access statistics is recorded on an hourly basis. Users may select the statistics by
yearly (statistics displayed by all months in the selected year)
monthly (statistics displayed by all days in the selected month)
daily (statistics displayed by all hours in the selected day)

Within the campus means the student visit that website within the school compound.

Outside the campus means the student visit that website outside the school compund.

Do I need to create 2 tables?
Jun 18 '07 #3
I have one example:

BEGIN
SELECT COUNTER INTO v_cnt
FROM PORTAL_HOME_NON_LOGIN_LOG
WHERE TO_CHAR(LOGDATETIME, 'DD-MON-YYYY H24') = TO_CHAR (LOGDATETIME, 'DD-MON-YYYY H24');

DBMS_OUTPUT.PUT_LINE('RECORD FOUND. -- INCREMENT COUNTER '
+ v_cnt);

EXCEPTION
WHEN NO_DATE_FOUND THEN
DBMS_OUTPUT.PUT_LINE ('RECORD NOT FOUND -- INSERTING RECORD ....');
INSERT INTO PORTAL_HOME_NON_LOGIN_LOG
(LOGDATETIME, COUNTER)
VALUES (TO_TIMESTAMP (SYSDATE, 'DD-MON-YYYY HH24'), 1);
COMMIT;
END INCREMENT_HOME_NON_LOGIN;
END LOG_COUNTER
Jun 18 '07 #4
debasisdas
8,127 Expert 4TB
What is the logic to find out wheather the student visit that website outside the school compund or from inside.

I could not findout anything from your code.
Jun 18 '07 #5
This code is given by my project tutor.

I'm sorry about It. I thought the tutor had done the "outside" thing
Jun 18 '07 #6
Is there any way about the "outside" coding?
Jun 18 '07 #7
debasisdas
8,127 Expert 4TB
Ok , u know that the user logs in from inside or outside ,right.

But how to implement the same logic in database.

How the database will know.

Please post clearly.
Jun 18 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Rajesh Kapur | last post by:
Hello, We use Informix and MySQL on linux/unix to drive our web application. SQL*Server is used only for backend enterprise applications within the firewall. I am trying to get the management to...
20
by: Mandy Memphis | last post by:
If I perform a mousedown within a document, move the mouse outside the browser window, and then release the mouse button, the document.onmouseup event does not fire. Is there any way to detect a...
4
by: Nad | last post by:
Hello, When I click on a linkbutton of a datagrid on a web form I open another web form on the same page within an iframe. The page within the iframe has a datagrid also and when I click on a...
1
by: Keith Rebello | last post by:
I have written a class to draw dimension lines (like you see in architectural drawings). I intend to use this class in engineering programs that have graphical output. The class has various...
9
by: blue875 | last post by:
I've seen this asked several times, but never a straight answer. I have a query returning a set of sorted rows. Let's say I get back: Alice Bob Charlie I want to add a number ranking, so it...
12
by: Steve Blinkhorn | last post by:
Does anyone know of a way of accessing and modifying variables declared static within a function from outside that function? Please no homilies on why it's bad practice: the context is very...
1
SamKL
by: SamKL | last post by:
Hey, I'm no expert on PHP, and I have somewhat of an understanding of object oriented code. Anyway, getting right to the problem. I'm using PHP4, so base it off of that. Basically I have 2...
5
by: OK | last post by:
I am using an image control to display some images within a virtual map (ImagesRoot in IIS) outside of the web root in my vb asp.net application. How should I code the imageurl property to have...
0
by: micahel | last post by:
Please chat with me by cnbbiz2008@hotmail.com to get the price and more photos, we take supplier paypal as payment. please see the photo album below for our product list. trainers supplier...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.