Codeigniter: db data in controller

Posted by Kevin Brown on Stack Overflow See other posts from Stack Overflow or by Kevin Brown
Published on 2010-05-05T20:22:11Z Indexed on 2010/05/06 1:58 UTC
Read the original article Hit count: 319

Filed under:
|
|

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:

  1. The current user has an id, and a manager_id.
  2. 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!

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about controller