Welcome Guest, Not a member yet? Register   Sign In
How to Return an Instance of the Loaded Model Class Rather Than The Loader
#2

(This post was last modified: 06-29-2018, 04:28 AM by Pertti.)

$this->load->model is meant for loading in script file (think of it as making this model code available in principle), not actually associate it to variables.

You probably want to get to is something like this:
PHP Code:
$this->load->model('model_name');
// ... 

$a = new Model_name('db_xxx''table_yyy');
$b = new Model_name('db_yyy''table_xxx'); 
Reply


Messages In This Thread
RE: How to Return an Instance of the Loaded Model Class Rather Than The Loader - by Pertti - 06-29-2018, 04:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB