Welcome Guest, Not a member yet? Register   Sign In
Access to libray or model from another model
#1

[eluser]Unknown[/eluser]
Hello people. I am sorry for my bad english. But I have a question. Can I load the library or model from another model?

This error
"A PHP Error was encountered
Severity: Notice
Message: Undefined property: Files_model::$catalog
Filename: models/files_model.php
Line Number: 9
Fatal error: Call to a member function set_cat_type() on a non-object in D:\server\www\lehe\core\application\models\files_model.php on line 9"
appears when I tryed to execute this code:

Code:
class Files_model extends Model
{
    function __construct()
    {
        parent::Model();
        $this->load->library('catalog');
        $this->catalog->set_cat_type('files');
    }

        function get_file_list()    
        {
                return $this->catalog->get_catalog_list();
        }

          . . . . . .
}


Messages In This Thread
Access to libray or model from another model - by El Forum - 08-10-2008, 04:54 AM
Access to libray or model from another model - by El Forum - 08-10-2008, 06:09 AM
Access to libray or model from another model - by El Forum - 08-10-2008, 08:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB