Codeigniter: db data in controller
- by Kevin Brown
I'm confused about what to do...
I'm working on a user's page where they can view certain things only if their supervisor has given them "money" or "credits". I need a simple way to get the person that is their supervisor by doing something like:
$data['employer'] = $this->home_model->getEmployees(array('user_id'=>$manager_id));
Basically, get the user information about a person who's user_id matches the manager_id of the currently logged in member.
I don't know how to set the variable $manager_id.
Additional Information:
The current user has an id, and a manager_id.
I need the id of the manager.
So, I need to grab the manager_id of the logged-in user and find the manager who's user_id is that of the manager_id.
What's the process to do this? I can get each individually, but I don't know how to use one to get the other...
I know it is confusing, but I'm confused! Thanks for the help!