Welcome Guest, Not a member yet? Register   Sign In
how to load a model with a parameter to construct the model....
#1

[eluser]Unknown[/eluser]
how to load a model with a parameter to construct the model....

just like :

class M_model extends Model {


function __construct($user_id = NULL) {
parent::Model ();
//do something here...
}

when i want
$this->load->model('m_model');

how to transfer the parameter $user_id to the model?


Messages In This Thread
how to load a model with a parameter to construct the model.... - by El Forum - 02-19-2009, 10:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB