Page 1 of 1

select question about user permission and the "boss&quo

Posted: Sun Feb 01, 2004 3:35 am
by pelegk2
i have user with certain pemission:
user name,user owner,user permission list= 1,4,7,33

and i have a "boss" for every few user's that have the user's permmision and more!

now i make a selec like this :

Code: Select all

SELECT * from myDb where user_owner='".$_SESSIONї'auth']ї'user_name']."'"
and i want when the "boss" enters that he will see all the row's of him self and his workers that ar relavent to both of them!
(beacuse myyabe the worker work;s for another department too,to which his boss dont have access to!)
how do i do that?
thanks i nadvance
peleg

Posted: Sun Feb 01, 2004 3:49 am
by markl999
Ok, this one hurts my brain when i read it ;)
It sounds like you database design is making life difficult, might be worth trying to come up with a more logical design that makes these queries much easier. Unless someone else can decipher the problem and come up with an answer ;)