469,578 Members | 1,775 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

search 2 tables to get different session


I have sipmle logging script that cechs is user exist in user_table and if
pasword is corect.
know I want to serch 2 tables user_table and admin_table to lock if person
is user or admin
if admin I want to set one kind of permitions (to se specific pages) if
user to se.
that is the best way to do it?
should I set session to "user_id" and "admin_id" to se who is logget in?

Thanx in advance

Nov 10 '05 #1
1 1247
add a field to the user_table which has a groupd setting say
admin == 1
logged in == 2
anonymous == 3
and so on
a small look up table to get the assocaited permissions for each group
and this would be all one query using a join.

When you have validated the user also get his group id and group

on the other hand if different users have different permissions try
make a user_id/permission_id table. On Validation check what permission
set that user id is associated with and then retrieve the same from
your admin table

take care

Nov 10 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by R. Rajesh Jeba Anbiah | last post: by
3 posts views Thread by Stu | last post: by
4 posts views Thread by Joe Van Meer | last post: by
reply views Thread by dev | last post: by
1 post views Thread by ratnakarp | last post: by
2 posts views Thread by David Parker | last post: by
1 post views Thread by atl10spro | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.