Codeigniter: Using data in a controller

Posted by Kevin Brown on Stack Overflow See other posts from Stack Overflow or by Kevin Brown
Published on 2010-05-06T19:29:01Z Indexed on 2010/05/06 19:48 UTC
Read the original article Hit count: 100

Filed under:
|

I'm new to php and CI, and I'm having some trouble in my controller.

I feel that I'm doing this the wrong way, and it could be easier, I just don't know the syntax:

    $data['members'] = $this->home_model->getUser($id);
    $credit = $this->home_model->getCredit($id);
    if ($credit == '0'){stuff...}

So I'm getting the user's data that has their the same information as "getCredit" does, but I don't know how to get the single variable that I need for my if statement...

How can I just use the "getUser" function so that I'm not pulling redundant information?

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about beginner