Welcome Guest, Not a member yet? Register   Sign In
quick question about controller-model
#1

[eluser]Wondering Coder[/eluser]
Hi guys,

just want to ask how to throw a variable in model in the __construct() area.

Suppose I have this in my controller
Code:
controller function
{
..
$item = $this->uri->segment(3); //the value of this to be fetch to my model construct
..
}
My model
Code:
class User extends CI_Model {

    function __construct()
    {
        parent::__construct();
                //what to put here????
    }

or is this possible?




Theme © iAndrew 2016 - Forum software by © MyBB