Welcome Guest, Not a member yet? Register   Sign In
Using model - issue while using methods
#1

[eluser]Spir[/eluser]
Hi I have a weird issue.
I load a model then I use some methods from that model but it says the model is null...

I tought it's because of the name of my model but after checking the reserved names it's look ok.

Here is my code within a model that works fine :

Code:
$this->load->model('log');
$this->log->add($some_vars);
I have put some debug within the constructor. it's executed fine.

Example :
Code:
class Log extends Model {

    function Log(){
        parent::Model();
        
        echo 'hello yourself';
    }
does print. But when I want to use my methods it crash :
Quote:Undefined property: My_other_model::$log</p>
Call to a member function add() on a non-object


Messages In This Thread
Using model - issue while using methods - by El Forum - 12-23-2008, 07:41 AM
Using model - issue while using methods - by El Forum - 12-23-2008, 07:47 AM
Using model - issue while using methods - by El Forum - 12-23-2008, 07:53 AM
Using model - issue while using methods - by El Forum - 12-23-2008, 08:17 AM
Using model - issue while using methods - by El Forum - 12-23-2008, 08:36 AM
Using model - issue while using methods - by El Forum - 12-23-2008, 08:38 AM
Using model - issue while using methods - by El Forum - 12-23-2008, 08:59 AM
Using model - issue while using methods - by El Forum - 12-23-2008, 10:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB