Reading and comparing data from 2 tables

Reply

Join Date: Mar 2008
Posts: 269
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Reading and comparing data from 2 tables

 
0
  #1
Jun 2nd, 2009
I am designing a Library website, and I have two table Libarian and Student table so when the Libarian login should have access to all the database(Adding new record, updating and all) but when the student login should only view the database without changing anything, so What I want to know is how do I read from those two tables and see who has logged in so that I can provide him/her with suitable information, I understand that I need to read from both tables everytime a person login then determine if the person is a student or a Librarian then give the person the access s/he deserves in the website

I hope that makes sense
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,721
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 501
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Reading and comparing data from 2 tables

 
0
  #2
Jun 2nd, 2009
Design two pages : one for librarian and another for student. Configure Form authentication & authorization.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 269
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Re: Reading and comparing data from 2 tables

 
0
  #3
Jun 2nd, 2009
I dont think thats gona work coz this is gona be online website, so I will only have one login page for everyone coz there is gona be no way to determine who clicked the login button now between the librarian(who is responsible for the database and signing in and out the books) and the student who is gona browse thru the database checking if the books s/he needs are available and reserving them if they are not
Last edited by Traicey; Jun 2nd, 2009 at 11:00 am.
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 115
Reputation: ninjaimp is an unknown quantity at this point 
Solved Threads: 6
ninjaimp ninjaimp is offline Offline
Junior Poster

Re: Reading and comparing data from 2 tables

 
0
  #4
Jun 3rd, 2009
Where are you storing the log on details? Just hold all the logon information in on table e.g.

UID
Username
Password
AccessLevel

Create a different access level for librarians and students
and when the user logs in, depending on what their access level is you can allow/deny access to pages and so on.
Please mark this post as 'Solved' if it has helped and fixed your issue.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 185
Reputation: aashishn86 is an unknown quantity at this point 
Solved Threads: 9
aashishn86's Avatar
aashishn86 aashishn86 is offline Offline
Junior Poster

Re: Reading and comparing data from 2 tables

 
0
  #5
Jun 3rd, 2009
aren't you making it mandatory for the student to login to the site before browsing through the lists ?
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 269
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Re: Reading and comparing data from 2 tables

 
0
  #6
Jun 3rd, 2009
No, The student can reserve a book which is on loan so to do that the student needs to login, otherwise they can browse for books without logging in, sometimes there are articles or journals which are exclusively for members of the library

if you know what I mean so what I need is a sample code to do that or maybe just a clue on where to start
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 593 | Replies: 5
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC