[eluser]chakhar86[/eluser]
Hi there,
I curious to know if it's possible to load a model inside model???
I've tried and it failed.
I think CI should have this feature. For example when we create a model representing a table which has a relation to another table (which I defined in another model).
I need suggestion...
sorry for bad english
I've tried this,though:
Code:
class Has_something extends Model {
var $something;
function Has_something() {
require_once('./system/application/models/something.php');
$this->something[] = new Something();
}
}
oh, yeah. Another thing, is it possible to pass a parameter to Model (or Library) constructor?