bennystromberg
01-17-2004, 09:25 AM
I want to show information about people (first name, last name, title) on a web page coded in PHP. The problem is that I want different users to see different things. When a person logs in he should be able to see information about the people that works in the same company that he does.
I would like to write like this:
SELECT firstname, lastname, title FROM table WHERE username='logged in user'
But this only lists the single user that is logged on. What should the syntax look like if I want to show information about everybody in the company?
I have a field called company in my db.
Thanks a lot!
I would like to write like this:
SELECT firstname, lastname, title FROM table WHERE username='logged in user'
But this only lists the single user that is logged on. What should the syntax look like if I want to show information about everybody in the company?
I have a field called company in my db.
Thanks a lot!