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

[eluser]Spir[/eluser]
finally I did this :

in my model called My_model (previously). So remember this is the model that need to load my Log model :

Code:
class My_model extends Model {

    function __construct(){
        parent::Model();
    }


    function add(){
        // adding something

        // then log the create
        $this->_log(array('add','my_model'));
    }

    function _log($ome_vars){
        $CI =& get_instance();
        $CI->load->model('log');
        $CI->log->add($ome_vars);
    }
}

NB: I'm not using "Log" as a name for my model anymore. I guess I would have some conflict.


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