title: A controller problem using a base CRUD model
body: <p>In CodeIgniter I'm using a <a href="http://github.com/jamierumbelow/codeigniter-base-model" rel="nofollow noreferrer">base CRUD My_model</a>, but I have this small problem in my browse-controller.. My $data['posts'] gets all posts from the table called "posts". Though the author in that table is just a user_id, which is why I need to use my "getusername" function (gets the username from a ID) to grab the username from the users table.</p>
  
  <p>Though I don't know how to proceed from here, since it is not just one post. Therefore I need the username to either be a part of the $data['posts'] array or some other smart solution.</p>
  
  <p>Anyone who can help me out?</p>
  
  <pre><code> function index() {
    $this-&gt;load-&gt;model('browse_model');
  
    $data['posts'] = $this-&gt;browse_model-&gt;get_all();
    $data['user'] = $this-&gt;browse_model-&gt;getusername(XX);
  
    $this-&gt;load-&gt;view('header');
    $this-&gt;load-&gt;view('browse/index', $data);
    $this-&gt;load-&gt;view('footer');
   }
  </code></pre>